Exemple #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();
 }
Exemple #2
0
 /**
  * @return Law
  */
 public function getLaw()
 {
     return Law::find($this->law_id);
 }