public function getProperties($modified = false) { $result = parent::getProperties($modified); if (isset($result['children']) && $result['children'] instanceof KModelEntityInterface) { $result['children'] = $result['children']->getProperties(); } 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; }
public function toArray() { $data = parent::toArray(); if ($this->hasChildren()) { $data['children'] = array_values($this->getChildren()->toArray()); } return $data; }