Exemple #1
0
 /**
  * @return Option - from Category 'gender' assigned to user.
  */
 public function getGender()
 {
     return $this->hasOne(Option::className(), ['id' => 'genderId']);
 }
Exemple #2
0
 /**
  * @return array - list of Option having all the options belonging to this category
  */
 public function getOptions()
 {
     return $this->hasMany(Option::className(), ['categoryId' => 'id']);
 }