Your IP : 216.73.216.79


Current Path : /var/www/html/donate/backend/models/frontendheader/
Upload File :
Current File : /var/www/html/donate/backend/models/frontendheader/FrontendHeader.php

<?php

namespace backend\models\frontendheader;

use Yii;

/**
 * This is the model class for table "frontend_header".
 *
 * @property integer $header_id
 * @property string $header_content
 * @property string $header_description
 */
class FrontendHeader extends \yii\db\ActiveRecord
{
    /**
     * @inheritdoc
     */
    public static function tableName()
    {
        return 'frontend_header';
    }

    /**
     * @inheritdoc
     */
    public function rules()
    {
        return [
            [['header_content'], 'required'],
            [['header_is_php'], 'integer'],
            [['header_content','header_description'], 'string'],
        ];
    }

    /**
     * @inheritdoc
     */
    public function attributeLabels()
    {
        return [
			'header_id' => 'Header ID',
            'header_content' => 'Header Content',
            'header_description' => 'Header Description',
        ];
    }
	
	public static function dropdown(){
		static $dropdown;
		if($dropdown == null){
			$models = static::find()->all();
			foreach($models as $model){
				$dropdown[$model->header_id] = $model->header_description;				
			}
		}
		
		return $dropdown;
	}
}