public function getValue()
 {
     $value = parent::getValue();
     if (KT::arrayIsSerialized($value)) {
         return unserialize($value);
     }
     return $value;
 }
 public function renderParamTypes()
 {
     $selectedTypesValue = $this->getModel()->getParamTypes();
     if (KT::issetAndNotEmpty($selectedTypesValue) && KT::arrayIsSerialized($selectedTypesValue)) {
         $selectedTypes = unserialize($selectedTypesValue);
         $results = array();
         $allTypes = new KT_ZZZ_Reference_Type_Enum();
         $translates = $allTypes->getTranslates();
         foreach ($allTypes->getAllKeyValues() as $key => $value) {
             if (in_array($value, $selectedTypes)) {
                 $class = strtolower($key);
                 $translate = $translates[$value];
                 array_push($results, "<span class=\"{$class}\" title=\"{$translate}\">{$translate}</span>");
             }
         }
         echo implode(" | ", $results);
     }
 }
示例#3
0
 /**
  * Na základě předaného názvu sloupce jeho uloženou hodnotu
  * 
  * @author Tomáš Kocifaj
  * @link http://www.ktstudio.cz
  * 
  * @param string $column
  * @return string || int
  */
 public function getColumnValue($column)
 {
     if (KT::arrayIsSerialized($column)) {
         return unserialize($column);
     }
     return $this->{$column};
 }