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; }
public function __destruct() { $this->getValue()->destructValue(); parent::__destruct(); }