public function init() { $this->name = "База местоположений"; $this->modelShowAttribute = "name"; $this->modelClassName = KladrLocation::className(); parent::init(); }
/** * @return \yii\db\ActiveQuery */ public function getLocation() { return $this->hasOne(KladrLocation::className(), ['id' => 'location_id']); }