Ejemplo n.º 1
0
 public function getGearModel()
 {
     if ($this->gearModel === false) {
         $this->gearModel = $this->gear == '' ? null : Gear::findOne(['key' => (string) $this->gear]);
     }
     return $this->gearModel;
 }
Ejemplo n.º 2
0
 /**
  * @return \yii\db\ActiveQuery
  */
 public function getGear()
 {
     return $this->hasOne(Gear::className(), ['id' => 'gear_id']);
 }