<?php
/**
 * Created by PhpStorm.
 * User: sunmoon<i@liming.me>
 * Date: 2019/07/29
 * Time: 上午9:39
 */


namespace common\libs\logging\operate\valueType;

use common\models\EmployLevel;

class EmpLv extends AbstractValueType {
    public function result(){
        $value = $this->getValue();
        if(!is_array($value)){
            $value = (array)$value;
        }
        $allData = EmployLevel::getAllData();
        $result = '';
        foreach($value as $id){
            if(isset($allData[$id])){
                $result .= $allData[$id]['LEVEL_NAME'] . ' ';
            }
        }
        return $result;
    }
}