ModelBundle/DataFixtures/MongoDB/DemoContent/Error404DataGenerator.php
protected function generateNodeGlobal($htmlContent, $language, $routePattern)
    {
        $nodeError404Block = new Block();
        $nodeError404Block->setLabel('Wysiwyg');
        $nodeError404Block->setLanguage($language);
        $nodeError404Block->setComponent(TinyMCEWysiwygStrategy::NAME);
        $nodeError404Block->setAttributes(array(
            "htmlContent" => $htmlContent
        ));

        $nodeError404Block = $this->generateBlock($nodeError404Block);

        $main = new Area();
        $main->addBlock($nodeError404Block);

        $nodeError404 = $this->createBaseNode();
        $nodeError404->setArea('main', $main);

        $nodeError404->setNodeType(NodeInterface::TYPE_ERROR);
        $nodeError404->setLanguage($language);
        $nodeError404->setNodeId(NodeInterface::ERROR_404_NODE_ID);
        $nodeError404->setName('404');
        $nodeError404->setVersionName($this->getVersionName($nodeError404));
        $nodeError404->setCreatedBy('fake_admin');
        $nodeError404->setParentId(NodeInterface::ROOT_PARENT_ID);
        $nodeError404->setRoutePattern($routePattern);
        $nodeError404->setInFooter(false);
        $nodeError404->setInMenu(false);
        $nodeError404->setOrder(-1);

        return $nodeError404;
    }
protected function generateNodeGlobal($htmlContent, $language, $routePattern)
    {
        $nodeError404Block = new Block();
        $nodeError404Block->setLabel('Wysiwyg');
        $nodeError404Block->setLanguage($language);
        $nodeError404Block->setComponent(TinyMCEWysiwygStrategy::NAME);
        $nodeError404Block->setAttributes(array(
            "htmlContent" => $htmlContent
        ));

        $nodeError404Block = $this->generateBlock($nodeError404Block);

        $main = new Area();
        $main->addBlock($nodeError404Block);

        $nodeError404 = $this->createBaseNode();
        $nodeError404->setArea('main', $main);

        $nodeError404->setNodeType(NodeInterface::TYPE_ERROR);
        $nodeError404->setLanguage($language);
        $nodeError404->setNodeId(NodeInterface::ERROR_404_NODE_ID);
        $nodeError404->setName('404');
        $nodeError404->setVersionName($this->getVersionName($nodeError404));
        $nodeError404->setCreatedBy('fake_admin');
        $nodeError404->setParentId(NodeInterface::ROOT_PARENT_ID);
        $nodeError404->setRoutePattern($routePattern);
        $nodeError404->setInFooter(false);
        $nodeError404->setInMenu(false);
        $nodeError404->setOrder(-1);

        return $nodeError404;
    }
@param string $htmlContent
@param string $language
@param string $routePattern

@return Node