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

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

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

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

        $nodeAutoPublish->setNodeId('fixture_auto_unpublish');
        $nodeAutoPublish->setName($name);
        $nodeAutoPublish->setVersionName($this->getVersionName($nodeAutoPublish));
        $nodeAutoPublish->setLanguage($language);
        $nodeAutoPublish->setParentId(NodeInterface::ROOT_NODE_ID);
        $nodeAutoPublish->setOrder(15);
        $nodeAutoPublish->setRoutePattern($routePattern);
        $nodeAutoPublish->setInFooter(false);
        $nodeAutoPublish->setInMenu(false);

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

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

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

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

        $nodeAutoPublish->setNodeId('fixture_auto_unpublish');
        $nodeAutoPublish->setName($name);
        $nodeAutoPublish->setVersionName($this->getVersionName($nodeAutoPublish));
        $nodeAutoPublish->setLanguage($language);
        $nodeAutoPublish->setParentId(NodeInterface::ROOT_NODE_ID);
        $nodeAutoPublish->setOrder(15);
        $nodeAutoPublish->setRoutePattern($routePattern);
        $nodeAutoPublish->setInFooter(false);
        $nodeAutoPublish->setInMenu(false);

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

@return Node