public function getProperties($modified = false) { $result = parent::getProperties($modified); if (isset($result['children']) && $result['children'] instanceof KModelEntityInterface) { $result['children'] = $result['children']->getProperties(); } return $result; }