returns a list of data from children of given node.
public loadByParent ( string $uuid, string $webspaceKey, string $languageCode, integer $depth = 1, boolean $flat = true, boolean $ignoreExceptions = false, boolean $excludeGhosts = false ) : Sulu\Component\Content\Compat\StructureInterface[] | ||
$uuid | string | The uuid of the parent node |
$webspaceKey | string | The key of the webspace we are loading in |
$languageCode | string | The requested content language |
$depth | integer | The depth of the search |
$flat | boolean | If true, the result is a flat list |
$ignoreExceptions | boolean | |
$excludeGhosts | boolean | If true ghost pages are also loaded |
return | Sulu\Component\Content\Compat\StructureInterface[] |
private function upgradeByParent(StructureBridge $parent, Webspace $webspace, Localization $localization, ContentMapperInterface $contentMapper, OutputInterface $output) { $pages = $contentMapper->loadByParent($parent->getUuid(), $webspace->getKey(), $localization->getLocalization(), 1); /** @var Page $page */ foreach ($pages as $page) { $this->upgradeNode($page, $webspace, $localization, $output, substr_count($page->getPath(), '/')); $this->upgradeByParent($page, $webspace, $localization, $contentMapper, $output); } }
private function copyNodeRecursive(StructureInterface $structure, $webspaceKey, $srcLocale, $destLocale, $overwrite) { $this->copyNode($webspaceKey, $srcLocale, $destLocale, $structure, $overwrite); if (!$structure->getHasChildren()) { return; } foreach ($this->contentMapper->loadByParent($structure->getUuid(), $webspaceKey, $srcLocale) as $child) { $this->copyNodeRecursive($child, $webspaceKey, $srcLocale, $destLocale, $overwrite); } }