/** * Returns count of tag's laws * @return int */ public function getLawCount() { return Law::find()->where(['tagYes' => $this->name])->orWhere(['tagNo' => $this->name])->count(); }
/** * @return Law */ public function getLaw() { return Law::find($this->law_id); }