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

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

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

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

        $nodeNews->setNodeId('fixture_page_news');
        $nodeNews->setName($name);
        $nodeNews->setVersionName($this->getVersionName($nodeNews));
        $nodeNews->setLanguage($language);
        $nodeNews->setParentId(NodeInterface::ROOT_NODE_ID);
        $nodeNews->setOrder(6);
        $nodeNews->setRoutePattern($routePattern);
        $nodeNews->setInFooter(false);
        $nodeNews->setInMenu(true);

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

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

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

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

        $nodeNews->setNodeId('fixture_page_news');
        $nodeNews->setName($name);
        $nodeNews->setVersionName($this->getVersionName($nodeNews));
        $nodeNews->setLanguage($language);
        $nodeNews->setParentId(NodeInterface::ROOT_NODE_ID);
        $nodeNews->setOrder(6);
        $nodeNews->setRoutePattern($routePattern);
        $nodeNews->setInFooter(false);
        $nodeNews->setInMenu(true);

        return $nodeNews;
    }
@param string $htmlContent
@param string $name
@param string $language
@param string $routePattern

@return Node