forked from pimcore/pimcore
/
Folder.php
42 lines (37 loc) · 981 Bytes
/
Folder.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
<?php
/**
* Pimcore
*
* This source file is subject to the GNU General Public License version 3 (GPLv3)
* For the full copyright and license information, please view the LICENSE.md and gpl-3.0.txt
* files that are distributed with this source code.
*
* @category Pimcore
* @package Asset
* @copyright Copyright (c) 2009-2015 pimcore GmbH (http://www.pimcore.org)
* @license http://www.pimcore.org/license GNU General Public License version 3 (GPLv3)
*/
namespace Pimcore\Model\Asset;
use Pimcore\Model;
class Folder extends Model\Asset
{
/**
* @var string
*/
public $type = "folder";
/**
* set the children of the document
*
* @return array
*/
public function setChilds($childs)
{
$this->childs = $childs;
if (is_array($childs) and count($childs > 0)) {
$this->hasChilds = true;
} else {
$this->hasChilds = false;
}
return $this;
}
}