Example #1
0
 protected function visitChildNodes(AbstractRenderNode $node)
 {
     $children = $node->getChildren();
     foreach ($children as $childNode) {
         $childNode->accept($this);
     }
 }
Example #2
0
 public function getParent()
 {
     $parentNode = $this->unitNode->getParent();
     if (!is_object($parentNode)) {
         return null;
     }
     return $parentNode->getModuleAPI($this->defaultVisitor, $this->newRenderContext);
 }
Example #3
0
 /**
  * @param AbstractRenderNode $node
  */
 protected function createNodeContent(AbstractRenderNode $node)
 {
     $this->content = $node->getUnit()->toArray();
 }
Example #4
0
 /**
  * @param Unit               $unit
  * @param \Render\ModuleInfo $moduleInfo
  * @param LegacyModule       $module
  * @param string             $parentId
  * @param NodeTree           $relatedTree
  */
 public function __construct(Unit $unit, ModuleInfo $moduleInfo, LegacyModule $module, $parentId, NodeTree $relatedTree)
 {
     parent::__construct($unit, $moduleInfo, $parentId, $relatedTree);
     $this->module = $module;
 }
Example #5
0
 /**
  * @param Unit                   $unit          the unit data of the current node
  * @param \Render\ModuleInfo     $moduleInfo    the module data of the current node
  * @param string                 $parentId      the id of the parent node
  * @param NodeTree               $relatedTree   the related NodeTree object
  * @param ModuleInterface $module        the module of the current node
  * @param string                 $moduleApiType the API which the module of current node used
  */
 public function __construct(Unit $unit, ModuleInfo $moduleInfo, $parentId, NodeTree $relatedTree, ModuleInterface $module, $moduleApiType)
 {
     parent::__construct($unit, $moduleInfo, $parentId, $relatedTree);
     $this->module = $module;
     $this->moduleApiType = $moduleApiType;
 }