コード例 #1
0
ファイル: UserJob.php プロジェクト: quynhvv/stepup
 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');
 }
コード例 #2
0
 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);
 }