public function getData($modified = false) { $result = parent::getData($modified); if (isset($result['children']) && $result['children'] instanceof Library\DatabaseRowsetInterface) { $result['children'] = $result['children']->getData(); } return $result; }
public function toArray() { $data = parent::toArray(); unset($data['file']); unset($data['contents']); $data['metadata'] = $this->metadata; if ($this->isImage()) { $data['type'] = 'image'; } return $data; }