/** * @param RabotaFizLica $rabota * @return string */ private function renderDolzhnosti($rabota) { foreach ($rabota->getDolzhnosti_fiz_lica_na_rabote_rel()->each() as $dolzhnost) { $dolzhnosti[] = ArrayHelper::getValue($dolzhnost, 'dolzhnost_rel.nazvanie'); } return isset($dolzhnosti) ? Html::ul($dolzhnosti, ['class' => 'dolzhnosti', 'encode' => false]) : ''; }
public function init() { parent::init(); $this->modules = ['raspisanie' => RaspisanieModule::className(), 'potok' => PotokModule::className()]; $this->activeRelationMap = [\app\records\FizLico::className() => FizLico::className(), \app\records\Kurs::className() => Kurs::className(), \app\records\RabotaFizLica::className() => RabotaFizLica::className()]; }
/** * @return ActiveQuery */ public function getRabota_fiz_lica_rel() { return $this->hasOne(RabotaFizLica::className(), ['id' => 'rabota_fiz_lica'])->inverseOf('dolzhnosti_fiz_lica_na_rabote_rel'); }
/** * @return ActiveQuery */ public function getRaboty_fiz_lica_rel() { return $this->hasMany(RabotaFizLica::className(), ['fiz_lico' => 'id'])->inverseOf('fiz_lico_rel'); }
public function getPervaya_dolzhnost_fiz_lica_na_rabote_rel() { $query = parent::getDolzhnosti_fiz_lica_na_rabote_rel(); $query->multiple = false; return $query; }