{@inheritDoc}
@see \page\model\nav\Leaf::createLeafContent($n2nContext, $cmdPath, $cmdContextPath)
198446
public function createLeafContent(N2nContext $n2nContext, Path $cmdPath, Path $cmdContextPath): LeafContent {
		return new CommonLeafContent($this, $cmdPath, $cmdContextPath, new EmptyController());
	}
342980
public function buildContent(Model\ContentInterface $content)
    {
        $view = new ContentView();
        $attributes = $view->getAttributes()->addClass('cms-content');

        if ($this->editor->isEnabled()) {
            $attributes
                ->setId('cms-content-' . $content->getId())
                ->setData([
                    'id'      => $content->getId(),
                    'actions' => [
                        // TODO
                    ],
                ]);
        }

        // Layout
        $this->editor->getLayoutAdapter()->buildContent($content, $view);

        foreach ($content->getContainers() as $container) {
            $view->containers[] = $this->buildContainer($container);
        }

        return $view;
    }
879328
public function CreatePage() 
	{ 
		$myWords = $this->WordCollection();
		
		$this->defaultXmlnukeDocument = new XmlnukeDocument($myWords->Value("TITLE"),$myWords->Value("ABSTRACT"));
		
		$blockcenter = new XmlBlockCollection($myWords->Value("TITLE"), BlockPosition::Center );
		$this->defaultXmlnukeDocument->addXmlnukeObject($blockcenter);
		
		$paragraph = new XmlParagraphCollection();
		$blockcenter->addXmlnukeObject($paragraph);

		$xslUsed = array();

		$xsl = new XSLFilenameProcessor("");
		$filelist = FileUtil::RetrieveFilesFromFolder($xsl->PrivatePath(), $xsl->Extension());
		$this->generateList($myWords->Value("LISTPERSONAL"), $paragraph, $filelist, $xslUsed, $xsl);

		$filelist = FileUtil::RetrieveFilesFromFolder($xsl->SharedPath(), $xsl->Extension());
		$this->generateList($myWords->Value("LISTGENERIC"), $paragraph, $filelist, $xslUsed, $xsl);
		
		return $this->defaultXmlnukeDocument->generatePage();
	}
1053104
private function SiblingsExceptLeaf(
        DaftNestedWriteableObject $newLeaf,
        DaftNestedWriteableObject $referenceLeaf
    ) : array {
        /**
        * @var array<int, DaftNestedWriteableObject>
        *
        * @psalm-var array<int, T>
        */
        $out = array_values(array_filter(
            $this->RecallDaftNestedObjectTreeWithId(
                $referenceLeaf->GetDaftNestedObjectParentId(),
                DaftNestedWriteableObjectTree::EXCLUDE_ROOT,
                DaftNestedWriteableObjectTree::RELATIVE_DEPTH_SAME
            ),
            /**
            * @psalm-param T $leaf
            */
            function (DaftNestedWriteableObject $leaf) use ($newLeaf) : bool {
                return $leaf->GetId() !== $newLeaf->GetId();
            }
        ));

        return $out;
    }
1208992
public function createEditForm(ContentNode $contentNode, Node $rootNode = null)
    {

        $templateVars = array(
            'action' => $this->get('router')->generate('mm_cmf_content_node_update', array(
                'id' => $contentNode->getId()
            ))
        );

        if ($rootNode)
            $templateVars['root_node'] = $rootNode;

        return $this->createForm(
            ContentNodeType::class,
            $contentNode,
            $templateVars
        );
    }
123590
public static function create(string $content): InvalidContentException
    {
        $template = 'Content of template \'%s\' is invalid. Did you use string with 1 placeholder at least?';
        $message = sprintf($template, $content);

        return new static($message);
    }
594524
public function createLeafContent(N2nContext $n2nContext, Path $cmdPath, Path $cmdContextPath): LeafContent {
		$pageContent = $this->lookupPageContent($n2nContext);
		$pageController = $pageContent->getPageController();
		
		$analyzer = new PageControllerAnalyzer(new \ReflectionClass($pageController));
		$leafContent = new PageLeafContent($this, $cmdPath, $cmdContextPath, $pageController);
		
		$pageMethod = $analyzer->analyzeMethod($pageController->getMethodName());
		if ($pageMethod === null) {
			throw new IllegalPageStateException('Page method '
					. TypeUtils::prettyMethName(get_class($pageController), $pageController->getMethodName())
					. ' does not exist. Used in: ' . get_class($pageController) . '#' . $pageController->getId());
		}
		$leafContent->setPageMethod($pageMethod);
		
		if (null !== ($pageContentT = $pageContent->t($this->getN2nLocale()))) {
			$leafContent->setSeTitle($pageContentT->getSeTitle());
			$leafContent->setSeDescription($pageContentT->getSeDescription());
			$leafContent->setSeKeywords($pageContentT->getSeKeywords());
		}
		
		if (null !== ($pageControllerT = $pageController->pageControllerT($this->getN2nLocale()))) {
			$leafContent->setContentItems($pageControllerT->getContentItems()->getArrayCopy());
		}
		
		return $leafContent;
	}
1116502
public function setNodeContent($path, $value)
    {
        $node = $this->getNode($path);
        if ($node) {
            while ($node->hasChildNodes()) {
                $node->removeChild($node->firstChild);
            }
            $node->appendChild($this->domDocument->createTextNode($value));
        }
    }
1238142
public function grabTextContentFromXmlElement($cssOrXPath)
    {
        $el = (new XmlStructure($this->connectionModule->_getResponseContent()))->matchElement($cssOrXPath);
        return $el->textContent;
    }
463794
static function CreateWithText($path, $text)
    {
        $dir = Path::Directory($path);
        if (!Folder::Exists($dir))
            Folder::Create($dir);
        
        file_put_contents($path, $text);
    }
138682
public function createNewContent($name)
    {
        $this->getSession()->visit('/admin/content');
        $contentTypes = $this->getSession()->getPage()->findAll('xpath', '//div[@class="megamenu-content"]//li');

        if (is_array($contentTypes) && count($contentTypes)) {
            // Put the content type here
            $_element = null;

            // Iterate the content types in the list
            foreach ($contentTypes as $element) {
                /** @var \Behat\Mink\Element\NodeElement $element */
                if (false !== strpos($element->getText(), $name)) {
                    $_element = $element;
                }
            }

            if (null === $_element) {
                throw new ExpectationException(
                    sprintf('Content type %s not found under "Create new". do you have the correct rights?', $name),
                    $this->getSession()->getDriver()
                );
            }

            $_element->clickLink($name);
        } else {
            // No navigation found
            throw new ExpectationException(
                'No content items found under "Create new", are you sure you are loggedin?',
                $this->getSession()->getDriver()
            );
        }
    }
342908
protected function generateContent($templatePath, $templateData)
    {
        $template = $this->getTemplate($templatePath);

        $content = $this->compile($template, $templateData);

        return $content;
    }
840356
public static function generateRoute(ContentRouteInterface $contentRoute, $path, $content, $addLocale = true)
    {
        $template = new Template(['template' => $contentRoute->getTemplate()]);

        $defaults = [
            'route_params' => '',
            Route::LOCALE => $contentRoute->getLocale(),
            RouteObjectInterface::CONTROLLER_NAME => $contentRoute->getController(),
            RouteObjectInterface::TEMPLATE_NAME => $template,
            RouteObjectInterface::CONTENT_OBJECT => $content,
        ];

        if (self::hasLocaleUrl()  && $addLocale) {
            $locale = substr($contentRoute->getLocale(), 0, 2);
            $path = self::stripLocale($path, $locale);
            $path = '/'.$locale.$path;
        }

        return new Route($path, $defaults);
    }
460051
function createContentDraft($parentLocationId, $contentTypeIdentifier, $fields, $languageCode = null )
    {
        $languageCode = $languageCode ?: self::DEFAULT_LANGUAGE;

        $repository = $this->getRepository();
        $content = $repository->sudo(
            function() use( $repository, $languageCode, $contentTypeIdentifier, $fields, $parentLocationId )
            {
                $contentService = $repository->getcontentService();
                $contentTypeService = $repository->getContentTypeService();
                $locationCreateStruct = $repository->getLocationService()->newLocationCreateStruct( $parentLocationId );

                $contentTypeIdentifier = $contentTypeService->loadContentTypeByIdentifier( $contentTypeIdentifier );
                $contentCreateStruct = $contentService->newContentCreateStruct( $contentTypeIdentifier, $languageCode );
                foreach ( array_keys( $fields ) as $key ) {
                    $contentCreateStruct->setField( $key, $fields[$key] );
                }
                return $contentService->createContent( $contentCreateStruct, array( $locationCreateStruct ) );
            }
        );

        $this->addObjectToList( $content );

        return $content;
    }
1201926
private function storeContents($path, $content = "")
    {
        GeneratorHelper::createDir(dirname($path));
        if ("" !== $content && false === file_put_contents($path, $content)) {
            throw new ConfigException(t('No se tienen permisos para escribir en ' . $path));
        }
    }
1012562
static public function makeRoomForLeaf($left, $prune = null, ConnectionInterface $con = null)
    {
        // Update database nodes
        ChildCategoryQuery::shiftRLValues(2, $left, null, $con);

        // Update all loaded nodes
        ChildCategoryQuery::updateLoadedNodes($prune, $con);
    }
913225
private function createCommandDocument()
    {
        $cmd = ['find' => $this->collectionName, 'filter' => (object) $this->filter];

        $options = $this->createQueryOptions();

        if (empty($options)) {
            return $cmd;
        }

        // maxAwaitTimeMS is a Query level option so should not be considered here
        unset($options['maxAwaitTimeMS']);

        $modifierFallback = [
            ['allowPartialResults', 'partial'],
            ['comment', '$comment'],
            ['hint', '$hint'],
            ['maxScan', '$maxScan'],
            ['max', '$max'],
            ['maxTimeMS', '$maxTimeMS'],
            ['min', '$min'],
            ['returnKey', '$returnKey'],
            ['showRecordId', '$showDiskLoc'],
            ['sort', '$orderby'],
            ['snapshot', '$snapshot'],
        ];

        foreach ($modifierFallback as $modifier) {
            if ( ! isset($options[$modifier[0]]) && isset($options['modifiers'][$modifier[1]])) {
                $options[$modifier[0]] = $options['modifiers'][$modifier[1]];
            }
        }
        unset($options['modifiers']);

        return $cmd + $options;
    }