public function models() { return [['class' => BlogPost::className(), 'change' => Sitemap::WEEKLY, 'priority' => 0.8]]; }
/** * @return \yii\db\ActiveQuery */ public function getBlogPost() { return $this->hasOne(BlogPost::className(), ['id' => 'post_id']); }
public function getPostsCount() { return $this->count(BlogPost::className(), ['catalog_id' => 'id']); }