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