예제 #1
0
 public function value()
 {
     $this->data['multilang'] = true;
     $langs = $this->type->data_langs($this->data);
     if (!$langs) {
         return parent::value();
     }
     $value = array();
     foreach ($langs as $lang => $ldata) {
         $value[$lang] = $this->item->{"{$this->name}_{$lang}"};
     }
     return $value;
 }
예제 #2
0
파일: SQLDateStr.php 프로젝트: techart/tao
 public function render($force_format = false)
 {
     $data = $this->data;
     $value = parent::value();
     if (empty($value)) {
         return '';
     }
     if (!isset($data['valid1970']) && CMS::date('Ymd', $value) == '19700101') {
         return '';
     }
     if (isset($data['format'])) {
         $format = $data['format'];
     }
     if ($force_format) {
         $format = $force_format;
     }
     if (empty($format)) {
         $format = 'd.m.Y';
         if (isset($data['with_time']) && $data['with_time']) {
             $format = 'd.m.Y - H:i';
         }
         if (isset($data['with_seconds']) && $data['with_seconds']) {
             $format = 'd.m.Y - H:i:s';
         }
     }
     $value = CMS::date($format, $value);
     return $value;
 }
예제 #3
0
파일: DateStr.php 프로젝트: techart/tao
 public function render()
 {
     $data = $this->data;
     $value = parent::value();
     return CMS_Fields_Types_DateStr::format_date($value, $data);
 }
예제 #4
0
파일: Textarea.php 프로젝트: techart/tao
 public function has_spliter()
 {
     $spliter = $this->get_spliter();
     if ($spliter) {
         return (bool) strpos(parent::value(), $spliter);
     }
     return false;
 }