예제 #1
0
 public function check()
 {
     if (!$this->required && !$this->value) {
         return;
     }
     $error = parent::check();
     if ($error) {
         return $error;
     }
     if ((int) $this->value != $this->value) {
         return array('integer', $this->printName());
     }
     return;
 }
예제 #2
0
 public function __toString()
 {
     $languages = c::get('languages');
     $lang = $currentLang = strtoupper(site()->language()->code());
     foreach ($languages as $l) {
         if (isset($l['default']) && $l['default']) {
             $lang = strtoupper($l['code']);
         }
     }
     if ($currentLang == $lang) {
         return parent::__toString();
     }
     return "";
 }
예제 #3
0
 /**
  * {@inheritDoc}
  */
 public function getData()
 {
     return (int) parent::getData();
 }