| Current Path : /var/www/html/dosmv2/backend/models/frontendfooter/ |
| Current File : /var/www/html/dosmv2/backend/models/frontendfooter/FrontendFooter.php |
<?php
namespace backend\models\frontendfooter;
use Yii;
/**
* This is the model class for table "frontend_footer".
*
* @property integer $footer_id
* @property string $footer_content
* @property string $footer_description
*/
class FrontendFooter extends \yii\db\ActiveRecord {
/**
* @inheritdoc
*/
public static function tableName() {
return 'frontend_footer';
}
/**
* @inheritdoc
*/
public function rules() {
return [
[['footer_content'], 'required'],
[['footer_is_php'], 'integer'],
[['footer_content', 'footer_description'], 'string'],
];
}
/**
* @inheritdoc
*/
public function attributeLabels() {
return [
'footer_id' => 'Footer ID',
'footer_content' => 'Footer Content',
'footer_description' => 'Footer Description',
];
}
public static function dropdown() {
static $dropdown;
if ($dropdown == null) {
$models = static::find()->all();
foreach ($models as $model) {
$dropdown[$model->footer_id] = $model->footer_description;
}
}
return $dropdown;
}
}