/** * @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) { $nodeContactBlock = new Block(); $nodeContactBlock->setLabel('Wysiwyg'); $nodeContactBlock->setComponent(TinyMCEWysiwygStrategy::NAME); $nodeContactBlock->setAttributes(array("htmlContent" => $htmlContent)); $nodeContactBlock = $this->generateBlock($nodeContactBlock); $main = new Area(); $main->addBlock($nodeContactBlock); $header = $this->createHeader(); $footer = $this->createFooter(); $nodeContact = $this->createBaseNode(); $nodeContact->setArea('main', $main); $nodeContact->setArea('footer', $footer); $nodeContact->setArea('header', $header); $nodeContact->setNodeId('fixture_page_contact'); $nodeContact->setName($name); $nodeContact->setLanguage($language); $nodeContact->setParentId(NodeInterface::ROOT_NODE_ID); $nodeContact->setOrder(9); $nodeContact->setRoutePattern($routePattern); $nodeContact->setInFooter(false); $nodeContact->setInMenu(true); return $nodeContact; }
/** * @return Area */ protected function createFooter() { $footer = new Area(); $footer->addBlock($this->fixture->getReference('footer menu')); $footer->addBlock($this->fixture->getReference('Wysiwyg footer')); return $footer; }
/** * @param string $name * * @return AreaInterface */ protected function generateArea($name) { $area = new Area(); $area->setAreaId($name); $area->setLabel($name); return $area; }
/** * @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; }