/**
  * @param string $htmlContent
  * @param string $language
  * @param string $routePattern
  *
  * @return Node
  */
 protected function generateNodeGlobal($htmlContent, $language, $routePattern)
 {
     $nodeError503Block = new Block();
     $nodeError503Block->setLabel('Wysiwyg');
     $nodeError503Block->setComponent(TinyMCEWysiwygStrategy::NAME);
     $nodeError503Block->setAttributes(array("htmlContent" => $htmlContent));
     $nodeError503Block = $this->generateBlock($nodeError503Block);
     $main = new Area();
     $main->addBlock($nodeError503Block);
     $header = $this->createHeader();
     $footer = $this->createFooter();
     $nodeError503 = $this->createBaseNode();
     $nodeError503->setArea('main', $main);
     $nodeError503->setArea('footer', $footer);
     $nodeError503->setArea('header', $header);
     $nodeError503->setNodeType(NodeInterface::TYPE_ERROR);
     $nodeError503->setLanguage($language);
     $nodeError503->setNodeId(NodeInterface::ERROR_503_NODE_ID);
     $nodeError503->setName('Error 503');
     $nodeError503->setCreatedBy('fake_admin');
     $nodeError503->setParentId(NodeInterface::ROOT_PARENT_ID);
     $nodeError503->setRoutePattern($routePattern);
     $nodeError503->setInFooter(false);
     $nodeError503->setInMenu(false);
     $nodeError503->setOrder(-1);
     return $nodeError503;
 }
 /**
  * @param string $htmlContent
  * @param string $name
  * @param string $language
  * @param string $routePattern
  *
  * @return Node
  */
 protected function generateNodeGlobal($htmlContent, $name, $language, $routePattern)
 {
     $nodeAutoPublishBlock = new Block();
     $nodeAutoPublishBlock->setLabel('Wysiwyg');
     $nodeAutoPublishBlock->setComponent(TinyMCEWysiwygStrategy::NAME);
     $nodeAutoPublishBlock->setAttributes(array("htmlContent" => $htmlContent));
     $nodeAutoPublishBlock = $this->generateBlock($nodeAutoPublishBlock);
     $main = new Area();
     $main->addBlock($nodeAutoPublishBlock);
     $header = $this->createHeader();
     $footer = $this->createFooter();
     $nodeAutoPublish = $this->createBaseNode();
     $nodeAutoPublish->setArea('main', $main);
     $nodeAutoPublish->setArea('footer', $footer);
     $nodeAutoPublish->setArea('header', $header);
     $nodeAutoPublish->setNodeId('fixture_auto_unpublish');
     $nodeAutoPublish->setName($name);
     $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 $language
  * @param string $routePattern
  *
  * @return Node
  */
 protected function generateNodeGlobal($htmlContent, $language, $routePattern)
 {
     $nodeHomeBlock = new Block();
     $nodeHomeBlock->setLabel('Wysiwyg');
     $nodeHomeBlock->setComponent(TinyMCEWysiwygStrategy::NAME);
     $nodeHomeBlock->setAttributes(array("htmlContent" => $htmlContent));
     $nodeHomeBlock = $this->generateBlock($nodeHomeBlock);
     $main = new Area();
     $main->addBlock($nodeHomeBlock);
     $header = $this->createHeader();
     $header->addBlock($this->fixture->getReference('Language list'));
     $footer = $this->createFooter();
     $nodeHome = $this->createBaseNode();
     $keyReference = "node-" . NodeInterface::ROOT_NODE_ID . '-' . $language . '-' . $this->version;
     if ($this->fixture->hasReference($keyReference)) {
         $nodeHome = $this->fixture->getReference($keyReference);
     }
     $nodeHome->setArea('main', $main);
     $nodeHome->setArea('footer', $footer);
     $nodeHome->setArea('header', $header);
     $nodeHome->setLanguage($language);
     $nodeHome->setNodeId(NodeInterface::ROOT_NODE_ID);
     $nodeHome->setCreatedBy('fake_admin');
     $nodeHome->setParentId(NodeInterface::ROOT_PARENT_ID);
     $nodeHome->setOrder(0);
     $nodeHome->setRoutePattern($routePattern);
     $nodeHome->setInFooter(false);
     $nodeHome->setInMenu(true);
     $nodeHome->setSitemapChangefreq('hourly');
     $nodeHome->setSitemapPriority('0.8');
     $nodeHome->setName('Orchestra ?');
     $nodeHome->setVersion($this->version);
     $nodeHome->setStatus($this->fixture->getReference($this->status));
     if ('status-published' == $this->status) {
         $nodeHome->setCurrentlyPublished(true);
     }
     return $nodeHome;
 }
 /**
  * @param string $htmlContent
  * @param string $name
  * @param string $language
  * @param string $routePattern
  *
  * @return Node
  */
 protected function generateNodeGlobal($htmlContent, $name, $language, $routePattern)
 {
     $nodeCommunityBlock = new Block();
     $nodeCommunityBlock->setLabel('Wysiwyg');
     $nodeCommunityBlock->setComponent(TinyMCEWysiwygStrategy::NAME);
     $nodeCommunityBlock->setAttributes(array("htmlContent" => $htmlContent));
     $nodeCommunityBlock = $this->generateBlock($nodeCommunityBlock);
     $main = new Area();
     $main->addBlock($nodeCommunityBlock);
     $header = $this->createHeader();
     $footer = $this->createFooter();
     $nodeCommunity = $this->createBaseNode();
     $nodeCommunity->setArea('main', $main);
     $nodeCommunity->setArea('footer', $footer);
     $nodeCommunity->setArea('header', $header);
     $nodeCommunity->setNodeId('fixture_page_community');
     $nodeCommunity->setLanguage($language);
     $nodeCommunity->setName($name);
     $nodeCommunity->setParentId(NodeInterface::ROOT_NODE_ID);
     $nodeCommunity->setOrder(3);
     $nodeCommunity->setRoutePattern($routePattern);
     $nodeCommunity->setTheme('themePresentation');
     $nodeCommunity->setInFooter(false);
     $nodeCommunity->setInMenu(true);
     return $nodeCommunity;
 }
    /**
     * @param ObjectManager $manager
     */
    protected function generateGlobalBlock(ObjectManager $manager)
    {
        $siteBlockLogo = new Block();
        $siteBlockLogo->setLabel('Wysiwyg logo');
        $siteBlockLogo->setStyle('default');
        $siteBlockLogo->setComponent(TinyMCEWysiwygStrategy::NAME);
        $orchestraTitle = "Open Orchestra";
        if ($this->hasReference('logo-orchestra')) {
            $orchestraTitle = '[media=original]' . $this->getReference('logo-orchestra')->getId() . '[/media]';
        }
        $siteBlockLogo->setAttributes(array("htmlContent" => '<a href="/" id="myLogo">' . $orchestraTitle . '</a>'));
        $this->generateBlock($manager, $siteBlockLogo);
        $siteBlockMainMenu = new Block();
        $siteBlockMainMenu->setLabel('Menu');
        $siteBlockMainMenu->setComponent('menu');
        $siteBlockMainMenu->setStyle('default');
        $this->generateBlock($manager, $siteBlockMainMenu);
        $siteBlockFooter = new Block();
        $siteBlockFooter->setLabel('Wysiwyg footer');
        $siteBlockFooter->setComponent(TinyMCEWysiwygStrategy::NAME);
        $siteBlockFooter->setAttributes(array("htmlContent" => <<<EOF
<div class='footer-networks'>
    <h4>Networks</h4>
    <ul>
        <li><a href="http://www.businessdecision.fr/">http://www.businessdecision.fr/</a></li>
        <li><a href="http://www.interakting.com/">http://www.interakting.com/</a></li>
    </ul>
</div>
<div class="footer-contact">
    <h4>Contact</h4>
    <ul>
        <li>Interakting</li>
        <li>153 Rue de Courcelles</li>
        <li>75017 Paris France</li>
        <li>01 56 21 21 21</li>
        <li><a href='/node/fixture_page_contact'>contact@interakting.com</a></li>
    </ul>
</div>
EOF
));
        $this->generateBlock($manager, $siteBlockFooter);
        $siteBlockFooterMenu = new Block();
        $siteBlockFooterMenu->setLabel('footer menu');
        $siteBlockFooterMenu->setStyle('default');
        $siteBlockFooterMenu->setComponent(FooterStrategy::NAME);
        $this->generateBlock($manager, $siteBlockFooterMenu);
        $siteBlockContact = new Block();
        $siteBlockContact->setLabel('Contact');
        $siteBlockContact->setComponent('contact');
        $siteBlockContact->setStyle('default');
        $this->generateBlock($manager, $siteBlockContact);
        $siteBlockLanguage = new Block();
        $siteBlockLanguage->setLabel('Language list');
        $siteBlockLanguage->setComponent(LanguageListStrategy::NAME);
        $this->generateBlock($manager, $siteBlockLanguage);
    }