/** * {@inheritDoc} */ public function getChildren() { $this->__initializer__ && $this->__initializer__->__invoke($this, 'getChildren', array()); return parent::getChildren(); }
/** * Collects recursively category ids * * @param \Shopware\Models\Category\Category $categoryModel */ protected function collectCategoryIds($categoryModel) { $categoryId = $categoryModel->getId(); $this->setCategoryIdCollection($categoryId); $categories = $categoryModel->getChildren(); if (!$categories) { return; } foreach ($categories as $category) { $this->collectCategoryIds($category); } return; }