示例#1
0
 /**
  * Get Mather.
  * @return Person|Null
  */
 public function getParent2()
 {
     return $this->hasOne(Person::className(), ['id' => 'id_parent2']);
 }
示例#2
0
 /**
  * Get Person.
  * @return Person
  */
 public function getPerson()
 {
     return $this->hasOne(Person::className(), ['id' => 'id_person']);
 }
示例#3
0
 /**
  * @return \yii\db\ActiveQuery
  */
 public function getPeople()
 {
     return $this->hasMany(Person::className(), ['department_id' => 'id']);
 }