forked from clime/pimcore-custom
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Resource.php
39 lines (33 loc) · 977 Bytes
/
Resource.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
<?php
/**
* Pimcore
*
* LICENSE
*
* This source file is subject to the new BSD license that is bundled
* with this package in the file LICENSE.txt.
* It is also available through the world-wide-web at this URL:
* http://www.pimcore.org/license
*
* @category Pimcore
* @package Element
* @copyright Copyright (c) 2009-2010 elements.at New Media Solutions GmbH (http://www.elements.at)
* @license http://www.pimcore.org/license New BSD License
*/
abstract class Element_Resource extends Pimcore_Model_Resource_Abstract {
/**
* @return array
*/
public function getParentIds() {
// collect properties via parent - ids
$parentIds = array(1);
$obj = $this->model->getParent();
if($obj) {
while($obj) {
$parentIds[] = $obj->getId();
$obj = $obj->getParent();
}
}
return $parentIds;
}
}