Returns the children for a given category.

@return array
773559
protected function children() : array
	{
		$categories = App::make('category.repository.cahe')->childrenOf($this->category_id, 50, [
			'id', 'category_id', 'name'
		]);

		return Normalizer::generation($categories)
        	->prepend((int) $this->category_id)
        	->all();
	}
556955
public function categorySearchChildrenAction()
    {
        $type = $this->params('type');
        $children = $this->getService($type)->getAll();

        $viewVars = array('children' => $children, 'type' => $type);
        return $this->partialView('category-search-children', $viewVars);
    }
935575
public function getChildren()
    {
        $children = [];
        if ($this->entity->getChildren()) {
            foreach ($this->entity->getChildren() as $child) {
                $children[] = new self($child, $this->locale);
            }
        }

        return $children;
    }
289020
public static function getAllSubcategoriesIds($category)
    {
        $ids = Database::getInstance()->getChildRecords($category, static::$strTable, false, (array) $category, (!BE_USER_LOGGED_IN ? 'published=1' : ''));
        $ids = \array_map('intval', $ids);

        return $ids;
    }
24993
public function children()
    {
        return $this->subChildren()
            ->with(['children' => function ($query) {
                $query->select(get_class($this)::getFillableFields());
            }])
            ->select(get_class($this)::getFillableFields());
    }
924848
public function get_children() {
        $children = array();

        if ($child = $this->get_area_user_private(0, '/', '.')) {
            $children[] = $child;
        }
/*
        if ($child = $this->get_area_user_profile(0, '/', '.')) {
            $children[] = $child;
        }
*/
        if ($child = $this->get_area_user_backup(0, '/', '.')) {
            $children[] = $child;
        }
        // do not list draft area here - it is browsable only if you know the draft itemid ;-)

        return $children;
    }
1171269
function getCategories()
    {
        $result = $this->db->query('SELECT * FROM category');

        $data = [];
        if (isset($result[0])) {
            foreach ($result as $v) {
                $data[$v->get('id')] = $v->get('name');
            }
        }
        return $data;
    }
634466
public function GetAll() {
      $CategoryData = $this->SQL
         ->Select('c.*')
         ->From('Category c')
         ->OrderBy('TreeLeft', 'asc')
         ->Get();
         
      $this->AddCategoryColumns($CategoryData);
      return $CategoryData;
   }
907964
public function getCategories()
    {
        if (null === $this->_categories) {

            $collection = Mage::getModel('catalog/category')->getCollection();

            $pathLike = Mage_Catalog_Model_Category::TREE_ROOT_ID . '/' . Mage::app()->getStore()->getRootCategoryId() . '/%';
            $collection
                ->initCache(Mage::app()->getCacheInstance(), self::class, [Mage_Catalog_Model_Category::CACHE_TAG])
                ->setStoreId(Mage::app()->getStore()->getId())
                ->addAttributeToSelect('*')
                ->addFieldToFilter('path', [
                    'like' => $pathLike,
                ])
                ->addIsActiveFilter()
                ->addAttributeToFilter('include_in_menu', 1)
                ->joinUrlRewrite();

            // Sort
            $collection->getSelect()->reset(Zend_Db_Select::ORDER);
            $collection
                ->addOrder('position', Varien_Data_Collection_Db::SORT_ORDER_ASC);

            foreach ($collection as $id => $category) {
                $this->_categories[$id] = $category;
            }
        }

        return $this->_categories;
    }
1330850
public function getChildren()
    {
        if ($this->children === null) {
            $this->setChildren($this->groupParameterRepository->getAllByParent($this));
        }
        return $this->children;
    }
1079658
protected function forCategories() : array
	{
		$categories = $this->products->pluck('category');

		return $categories->mapWithKeys(function ($item) use ($categories) {

				$result[$item->id] = [
					'id' => $item->id,
					'name' => $item->name,
					'qty' => $categories->where('id', $item->id)->count()
				];

				return $result;
		})->all();
	}
279854
public function getChildren()
    {
        if ($this->disableListing) {
            throw new DAV\Exception\MethodNotAllowed('Listing members of this collection is disabled');
        }
        $children = [];
        foreach ($this->principalBackend->getPrincipalsByPrefix($this->principalPrefix) as $principalInfo) {
            $children[] = $this->getChildForPrincipal($principalInfo);
        }

        return $children;
    }
703436
public function makeChildrenTree($categories)
    {
        $tmp = [];
        foreach ($categories as $key => $category){
            if(!key_exists('children', $category)) {
                $category->children = [];
            }

            // get children
            $children = $this->getChildren($category->categoryID);

            // call self to get a loop until every category has his children
            $category->children = $this->makeChildrenTree($children);

            $tmp[] = $category;
        }

        return Language::filterRows($tmp, false);
    }
81419
public function getChildrenUpdaters(): array {
        $key = get_class($this);
        if(!array_key_exists($key, self::$childrenUpdaters)) {
            return [];
        }
        return self::$childrenUpdaters[$key];
    }
559935
public function getRootCategories()
    {
        $rootCategories = [];
        foreach ($this->categories as $categories) {
            if ($categories->getLvl() == 0) {
                $rootCategories[] = $categories;
            }
        }

        return $rootCategories;
    }
1316952
public function getDescendants($parentCategories = null)
    {
        if(empty($parentCategories)) {
            $childCategories = $this->getChildren();
        }
        else {
            $childCategories = Category::find()
                ->where(['in', 'parent_id', ArrayHelper::map($parentCategories, 'id', 'id')])
                ->with('translation')
                ->all();
        }
        if(!empty($childCategories)) {
            return array_merge($childCategories, $this->getDescendants($childCategories));
        }
        return $childCategories;
    }
814490
private function getChildrenIds($categoryId)
    {
        $parentChildMapping = $this->getParentChildMapping();
        if ('' === $categoryId) {
            $categoryId = self::PARENT_CHILD_MAPPING_LOOKUP_FOR_ROOT_NODES;
        }
        if (!isset($parentChildMapping[$categoryId])) {
            return array();
        }

        return $parentChildMapping[$categoryId];
    }