store\components\behaviors\DCategoryTreeBehavior::getUrlList PHP Method

getUrlList() public method

..)
public getUrlList ( mixed $parent ) : array
$parent mixed number, object or array of numbers
return array
    public function getUrlList($parent = 0)
    {
        $criteria = $this->getOwnerCriteria();
        if (!$parent) {
            $parent = $this->getOwner()->getPrimaryKey();
        }
        if ($parent) {
            $criteria->compare($this->primaryKeyAttribute, $this->getChildsArray($parent));
        }
        $items = $this->cached($this->getOwner())->findAll($criteria);
        $categories = [];
        foreach ($items as $item) {
            $categories[(int) $item->{$this->parentAttribute}][] = $item;
        }
        return $this->_getUrlListRecursive($categories, $parent);
    }