512), array('study_content, awards_content, champions_content, qualifications_content, keywords, description', 'safe'), // The following rule is used by search(). // Please remove those attributes that should not be searched. array('id, lang, page_name, study_title, study_image, study_content, study_button, study_link, awards_content, awards_button, awards_link, champions_content, qualifications_content, team_link, title, keywords, description', 'safe', 'on' => 'search'), ); } /** * @return array relational rules. */ public function relations() { // NOTE: you may need to adjust the relation name and the related // class name for the relations automatically generated below. return array( 'sportRoot' => array(self::BELONGS_TO, 'SportRoot', 'id'), ); } /** * @return array customized attribute labels (name=>label) */ public function attributeLabels() { return array( 'id' => 'ID', 'lang' => 'Язык', 'page_name' => 'Название страницы', 'study_title' => 'Заголовок блока обучения', 'study_image' => 'Картинка блока обучения', 'study_content' => 'Содержимое блока обучения', 'study_button' => 'Текст кнопки в блоке обучения', 'awards_content' => 'Содержимое блока наши награды', 'awards_button' => 'Текст ccылки в блоке наши победы', 'champions_content' => 'Содержимое блока наши чемпионы', 'qualifications_content' => 'Содержимое блока квалификации', 'content' => 'Содержимое страницы', 'title' => 'Заголовок', 'keywords' => 'Ключевые слова', 'description' => 'Описание', 'study_link' => 'Ссылка на страницу обучение', 'awards_link' => 'Ссылка на страницу наград', 'team_link' => 'Ссылка на страницу команды', ); } /** * Retrieves a list of models based on the current search/filter conditions. * @return CActiveDataProvider the data provider that can return the models based on the search/filter conditions. */ public function search() { // Warning: Please modify the following code to remove attributes that // should not be searched. $criteria = new CDbCriteria; // $criteria->compare('id', $this->id); $criteria->compare('lang', $this->lang, true); $criteria->compare('page_name', $this->page_name, true); $criteria->compare('study_title', $this->study_title, true); $criteria->compare('study_image', $this->study_image, true); $criteria->compare('study_content', $this->study_content, true); $criteria->compare('study_button', $this->study_button, true); $criteria->compare('study_link', $this->study_link, true); $criteria->compare('awards_content', $this->awards_content, true); $criteria->compare('awards_button', $this->awards_button, true); $criteria->compare('awards_link', $this->awards_link, true); $criteria->compare('champions_content', $this->champions_content, true); $criteria->compare('qualifications_content', $this->qualifications_content, true); $criteria->compare('team_link', $this->team_link, true); $criteria->compare('title', $this->title, true); $criteria->compare('keywords', $this->keywords, true); $criteria->compare('description', $this->description, true); return new CActiveDataProvider($this, array( 'criteria' => $criteria, )); } }