コード例 #1
0
ファイル: folder.php プロジェクト: kosmosby/medicine-prof
	public function getProperties($modified = false)
	{
		$result = parent::getProperties($modified);

		if (isset($result['children']) && $result['children'] instanceof KModelEntityInterface) {
			$result['children'] = $result['children']->getProperties();
		}

		return $result;
	}
コード例 #2
0
ファイル: file.php プロジェクト: kosmosby/medicine-prof
    public function toArray()
    {
        $data = parent::toArray();

        unset($data['file']);
		unset($data['contents']);

		$data['metadata'] = $this->metadata;

		if ($this->isImage()) {
			$data['type'] = 'image';
		}

        return $data;
    }
コード例 #3
0
ファイル: folder.php プロジェクト: nooku/nooku-files
 public function toArray()
 {
     $data = parent::toArray();
     if ($this->hasChildren()) {
         $data['children'] = array_values($this->getChildren()->toArray());
     }
     return $data;
 }