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);
}