public function toArray()
 {
     $arr = parent::toFlatArray();
     $arr[$this->getFieldClass()] = $this->getFieldInstance()->toArray();
     if ($arr['value'] && $this->value->getField()->getDataType() instanceof ARDate) {
         $arr['formatted'] = $this->getApplication()->getLocale()->getFormattedTime(strtotime($arr['value']));
     }
     return $arr;
 }
Esempio n. 2
0
 public function __destruct()
 {
     $this->getValue()->destructValue();
     parent::__destruct();
 }