255] ]; } /** * @inheritdoc */ public function attributeLabels() { return [ 'description' => 'Description', 'image' => 'Image', 'address' => 'Address', 'email' => 'Email', 'gallery' => 'Gallery', 'program' => 'Program', 'id' => 'ID', 'name' => 'Name', ]; } function isActive($array) { $array = explode(',' , $array); if(in_array($this->id, $array)){ return "checked"; } else{ return ""; } } public function behaviors() { return [ 'slug' => [ 'class' => 'common\behaviors\Slug', 'in_attribute' => 'name', 'out_attribute' => 'translit', 'translit' => true ] ]; } public function schoolsForFooter() { return self::find()->limit(4)->all(); } }