/** * Returns sub-nodes in a flat list. The result is ordered * in such a way that it reflects the structure of the tree: * * cat 1 * - cat 1.1 * -- cat 1.1.1 * -- cat 1.1.2 * - cat 1.2 * -- cat 1.2.1 * -- cat 1.2.2 * * Will return * * cat 1 * cat 1.1 * cat 1.1.1 * cat 1.1.2 * cat 1.2 * cat 1.2.1 * cat 1.2.2 * * @return \TYPO3\CMS\Extbase\Persistence\ObjectStorage */ public function getSubNodes() { $subNodes = new ObjectStorage(); if ($this->children !== null && $this->children->count() > 0) { foreach ($this->children as $child) { $subNodes->attach($child); $subNodes->addAll($child->getSubNodes()); } } return $subNodes; }
/** * @param \TYPO3\CMS\Extbase\Persistence\ObjectStorage $storage * * @see \TYPO3\CMS\Extbase\Persistence\ObjectStorage::addAll */ public function addAll($storage) { $this->initialize(); parent::addAll($storage); }
/** * @param \TYPO3\CMS\Extbase\Persistence\ObjectStorage $storage * * @see \TYPO3\CMS\Extbase\Persistence\ObjectStorage::addAll */ public function addAll(\TYPO3\CMS\Extbase\Persistence\ObjectStorage $storage) { $this->initialize(); parent::addAll($storage); }