36], [['alias', 'old_url', 'author', 'link'], 'string', 'max' => 255], [['meta_title'], 'string', 'max' => 70], [['id'], 'unique'], ]; } /** * {@inheritdoc} */ public function attributeLabels() { return [ 'id' => 'ID', 'uid' => 'Uid', 'alias' => 'Alias', 'old_url' => 'Old Url', 'dt_pub' => 'Dt Pub', 'dt_cr' => 'Dt Cr', 'dt_upd' => 'Dt Upd', 'rev' => 'Rev', 'title' => 'Title', 'lid' => 'Lid', 'text' => 'Text', 'meta_title' => 'Meta Title', 'author' => 'Author', 'show_author' => 'Show Author', 'editors' => 'Editors', 'link' => 'Link', 'embed_url' => 'Embed Url', 'photo_name' => 'Photo Name', 'photo_title' => 'Photo Title', 'photo_include' => 'Photo Include', 'photo_rcol' => 'Photo Rcol', 'active' => 'Active', 'verifed' => 'Verifed', 'top' => 'Top', 'NH' => 'Nh', 'comments' => 'Comments', 'flags' => 'Flags', 'photo' => 'Photo', 'video' => 'Video', 'audio' => 'Audio', 'export_rss' => 'Export Rss', 'noindex' => 'Noindex', 'type' => 'Type', 'inscription' => 'Inscription', 'old_gallery_title' => 'Old Gallery Title', ]; } /** * {@inheritdoc} * @return NewsQuery the active query used by this AR class. */ public static function find() { return new NewsQuery(get_called_class()); } /** * @return \yii\db\ActiveQuery */ public function getTopicRelations() { return $this->hasMany(NewsTopicRelation::class,['news_id'=>'id']); } /** * @return \yii\db\ActiveQuery */ public function getTopics() { return $this->hasMany(NewsTopic::class,['id'=>'topic_id'])->via('topicRelations'); } }