Exemple #1
0
 /**
  * Сохраняет значение для показа в таблице
  */
 public function safe4show($val)
 {
     $allowed = $this->getColumnAllowedValues();
     if (count($allowed)) {
         $option = array_get_value($val, $allowed);
         return is_array($option) ? PsHtml::nobr($val . ' (' . array_get_value('content', $option) . ')') : $val;
     }
     switch ($this->getType()) {
         case self::TYPE_INT_DATE:
             return is_numeric($val) ? PsHtml::nobr(DatesTools::inst()->uts2dateInCurTZ($val, DF_PS_HM)) : null;
     }
     return $val;
 }