public function toArray($element = null) { $result = parent::toArray($element); $result['fullPath'] = $this->getFullPath(); $result['hasClass'] = !!$this->getClass(); return $result; }