/**
  * @return Node
  */
 protected function createBaseNode()
 {
     $node = new Node();
     $node->setMaxAge(1000);
     $node->setNodeType(NodeInterface::TYPE_DEFAULT);
     $node->setSiteId('2');
     $node->setPath('-');
     $node->setVersion($this->version);
     $node->setStatus($this->fixture->getReference($this->status));
     if ('status-published' == $this->status) {
         $node->setCurrentlyPublished(true);
     }
     $node->setDeleted(false);
     $node->setTemplate('default');
     $node->setTheme('themePresentation');
     $node->setDefaultSiteTheme(true);
     return $node;
 }
Пример #2
0
 /**
  * @param string $nodeId
  * @param string $parentId
  * @param string $routePattern
  * @param string $name
  * @param string $language
  * @param string $type
  *
  * @return NodeInterface
  */
 protected function generateNode($nodeId, $parentId, $routePattern, $name, $language, $type = NodeInterface::TYPE_DEFAULT)
 {
     $node = new Node();
     $node->setNodeId($nodeId);
     $node->setNodeType($type);
     $node->setSiteId('2');
     $node->setParentId($parentId);
     $node->setPath('-');
     $node->setRoutePattern($routePattern);
     $node->setName($name);
     $node->setVersion(1);
     $node->setLanguage($language);
     $node->setDeleted(false);
     $node->setCreatedAt(new \Datetime());
     $node->setUpdatedAt(new \Datetime());
     $node->setStatus($this->statusPublished);
     return $node;
 }
 /**
  * @return Node
  */
 protected function getSitePageNode()
 {
     $node = new Node();
     $node->setMaxAge(1000);
     $node->setNodeType('page');
     $node->setSiteId('3');
     $node->setPath('-');
     $node->setVersion(1);
     $node->setTemplate('default');
     $node->setTheme('themePresentation');
     return $node;
 }