public function getJobFunctionTitle() { $items = array(); if ($this->agent_job_function and is_array($this->agent_job_function)) { $items = ArrayHelper::map(JobFunction::find()->where(['in', '_id', $this->agent_job_function])->asArray()->all(), '_id', 'title'); } return $items ? implode(', ', $items) : Yii::t('common', 'Not set'); }
public function getFunctionNames() { if (is_array($this->functions)) { $items = ArrayHelper::map(JobFunction::find()->where(['in', '_id', $this->functions])->asArray()->all(), '_id', 'title'); } else { $items = ArrayHelper::map(JobFunction::find()->where(['_id' => $this->functions])->asArray()->all(), '_id', 'title'); } return implode('; ', $items); }