예제 #1
0
 public function postInit()
 {
     parent::postInit();
     if ($this->hasFlag(self::AF_OBLIGATORY) && !$this->hasFlag(self::AF_DATE_DEFAULT_EMPTY)) {
         $this->setInitialValue(self::dateArray(date('Ymd')));
     }
 }
예제 #2
0
 /**
  * If a timezone attribute is set, make sure
  * it's always loaded.
  */
 public function postInit()
 {
     parent::postInit();
     if ($this->m_timezoneAttribute !== null) {
         $node = $this->getOwnerInstance();
         $parts = explode('.', $this->m_timezoneAttribute);
         $attr = $node->getAttribute($parts[0]);
         $attr->addFlag(self::AF_FORCE_LOAD);
     }
     $this->m_date->postInit();
     $this->m_time->postInit();
 }