store\components\behaviors\DCategoryTreeBehavior::getChildsArray PHP Метод

getChildsArray() публичный Метод

Returns array of primary keys of children items
public getChildsArray ( mixed $parent ) : array
$parent mixed number, object or array of numbers
Результат array
    public function getChildsArray($parent = 0)
    {
        $parents = $this->processParents($parent);
        $this->cached();
        $criteria = $this->getOwnerCriteria();
        $criteria->select = 't.' . $this->primaryKeyAttribute . ', t.' . $this->titleAttribute . ', t.' . $this->parentAttribute;
        $command = $this->createFindCommand($criteria);
        $items = $command->queryAll();
        $this->clearOwnerCriteria();
        $result = [];
        foreach ($parents as $parent_id) {
            $this->_childsArrayRecursive($items, $result, $parent_id);
        }
        return array_unique($result);
    }