Add page structure

@param                 $pageName
@param MbPageStructure $mbPageStructure
17291
public function addMbPageStructure($pageName, MbPageStructure $mbPageStructure)
    {
        $mbPageStructure->setMbPage(MbPage::create($pageName));
        $mbPageStructure->enablePage();
        $mbPageStructure->execute($this->getMbRequest(), $this->getMbResponse(), $this);
    }
1149421
public void addPages() {
		page = new CreateComponentStartPage(selection);
		addPage(page);
		integrationComponentPage = new CreateIntegrationComponentPage(selection);
		addPage(integrationComponentPage);
		
		serviceDescriptionComponentPage = new CreateServiceDescriptionComponentPage(selection);
		addPage(serviceDescriptionComponentPage);
		
		page3 = new StatusPage(selection);
		addPage(page3);
	}
764251
protected function buildLengthAware($numberOfPages)
    {
        $pages = $this->newPages();

        if ($this->totalCount < 1) {
            return $pages;
        }

        return $this->addPages($pages, 1, $numberOfPages);

    }
896426
public static function createPage(UtilityContext $context, string $pageName, ?string ...$parameters)
    {
        /* Note: no return type to enable type-hinting */

        if (self::$factory === null) {
            self::$factory = self::getFactory(self::$installType);
        }

        return self::$factory::createPage($context, $pageName, ...$parameters);
    }
742685
public function setPermalinkStructure($wp_rewrite, $structure)
    {
        // Set the new permalinks structure
        $wp_rewrite->set_permalink_structure($structure);
        // Flush the rules and tell it to write htaccess
        $wp_rewrite->flush_rules(true);

        // Clear the rewrite rules options cache
        update_option("rewrite_rules", false);
    }
1125568
def initializePage(self):
        
        tree = self.uiStructureTREE
        tree.blockSignals(True)
        tree.setUpdatesEnabled(False)
        self.uiStructureTREE.clear()
        xstruct = self.scaffold().structure()
        
        self._structure = xstruct
        for xentry in xstruct:
            XScaffoldElementItem(tree, xentry)
        
        tree.blockSignals(False)
        tree.setUpdatesEnabled(True)
204994
private function AddArticlePageSelector()
    {
        $name = 'ArticlePage';
        $this->articlePageSelector = new PageSelector($name, Trans($this->Label($name)), 
                $this->articleList->GetArticlePage());
        
        $this->articlePageSelector->SetSite($this->Page()->GetSite());
        $this->Elements()->AddElement($name, $this->articlePageSelector);
    }
1101898
protected function addPageLinks(&$r, $classname, $pages) {
		$pageSize = $pages ['pageSize'];
		unset ( $pages ['pageSize'] );
		foreach ( $pages as $page => $number ) {
			$r ['links'] [$page] = $this->getLink ( $this->pageLink, [ "baseRoute" => $this->baseRoute,'classname' => $classname,'pageNumber' => $number,'pageSize' => $pageSize ] );
		}
	}
920494
protected function addPageName()
    {
        if (! empty($this->getPageName()) && ! in_array($this->getPageName(), $this->collection)) {
            $this->add($this->getPageName());
        }
    }
898307
protected function buildPage($pageIndex, $view, $posts)
    {
        $viewData = array_merge(
            $this->viewsData,
            [
                'paginatedBlogPosts' => $posts,
                'previousPage' => $this->getPreviousPageLink($pageIndex),
                'nextPage' => $this->getNextPageLink($pageIndex),
            ]
        );

        $pageContent = $this->viewFactory->make($view, $viewData)->render();

        $directory = sprintf('%s/blog-page/%d', KATANA_PUBLIC_DIR, $pageIndex + 1);

        $this->filesystem->makeDirectory($directory, 0755, true);

        $this->filesystem->put(
            sprintf('%s/%s', $directory, 'index.html'),
            $pageContent
        );
    }
182920
protected void addPageComponent(PageComponent pageComponent) {
        pageComponents.add(pageComponent);
        doAddPageComponent(pageComponent);
        pageComponent.addPropertyChangeListener(pageComponentUpdater);

        fireOpened(pageComponent);
    }
1343593
private function addBreadcrumb(StructureBehavior $document, VisitorInterface $visitor)
    {
        $items = [];
        $parentDocument = $this->inspector->getParent($document);
        while ($parentDocument instanceof StructureBehavior) {
            $item = [];
            if ($parentDocument instanceof UuidBehavior) {
                $item['uuid'] = $parentDocument->getUuid();
            }

            $item['title'] = $parentDocument->getStructure()->getProperty('title')->getValue();

            $items[] = $item;

            $parentDocument = $this->inspector->getParent($parentDocument);
        }

        $items = array_reverse($items);

        array_walk(
            $items,
            function(&$item, $index) {
                $item['depth'] = $index;
            }
        );

        $visitor->addData('breadcrumb', $items);
    }
528212
public function addPage(\CampaignChain\Location\FacebookBundle\Entity\Page $pages)
    {
        $this->pages[] = $pages;

        return $this;
    }
775501
public function addHtmlContent(\Haven\CmsBundle\Entity\PageContent $pageContents) {

        $this->addPageContent($pageContents);

        return $this;
    }
207575
public function addTextContent(\Haven\CmsBundle\Entity\PageContent $pageContents) {

        $this->addPageContent($pageContents);

        return $this;
    }
709182
private function createCmsPage($pageData)
    {
        // Check if template filename exists
        $filename = $pageData['filename'];
        $template = $this->getTemplatePath('pages') . $filename;
        // phpcs:ignore
        if (!file_exists($template)) {
            return;
        }

        // Remove filename from data
        unset($pageData['filename']);

        // Fetch template content
        // phpcs:ignore
        $templateContent = @file_get_contents($template);

        $data = [
            'stores'    => [0],
            'is_active' => 1,
        ];

        if (preg_match('/<!--@title\s*(.*?)\s*@-->/u', $templateContent, $matches)) {
            $data['title'] = $matches[1];
            $data['content_heading'] = $matches[1];
            $templateContent = str_replace($matches[0], '', $templateContent);
        }

        if (preg_match('/<!--@identifier\s*((?:.)*?)\s*@-->/us', $templateContent, $matches)) {
            $data['identifier'] = $matches[1];
            $templateContent = str_replace($matches[0], '', $templateContent);
        }

        if (isset($pageData['page_layout']) && !empty($pageData['page_layout'])) {
            $data['page_layout'] = $pageData['page_layout'];
        } else {
            $data['page_layout'] = '1column';
        }

        /**
         * Remove comment lines
         */
        $content = preg_replace('#\{\*.*\*\}#suU', '', $templateContent);
        $content = trim($content);
        $data['content'] = $content;

        $page = $this->pageFactory->create();
        $page = $page->load($data['identifier'], 'identifier');

        if ($page->getId()) {
            $data['page_id'] = $page->getId();
        }

        $page->addData($data);
        $this->pageRepository->save($page);

        if (isset($pageData['config_option'])) {
            $this->saveConfigValue($pageData['config_option'], $data['identifier'], 0);
        }
    }
1340506
protected function addPage()
    {
        try {
            $values = $this->defaultPage;
            $values['TemplateName'] = $this->templateManager->getTemplate()->getTemplateName();

            $result = $this->pageManager
                ->set(null)
                ->save($values)
            ;

            if (! $result) {
                $this->errorMessage = "An error occoured during the saving of the new page";
            }

            return $result;
        } catch (\Exception $ex) {
            $this->errorMessage = "An error occoured during the saving of the new page. The reported error is: " . $ex->getMessage();

            return false;
        }
    }