protected function setArtifactLinks(TreeNode $node, $artifactLinks)
 {
     if (is_array($artifactLinks)) {
         $artifactLinks = implode(', ', $artifactLinks);
     }
     $nodeData = $node->getData();
     $nodeData['artifactlinks'] = $artifactLinks;
     $node->setData($nodeData);
     return $node;
 }
Exemplo n.º 2
0
 function visit(TreeNode $node)
 {
     $data = $node->getData();
     echo '<div style="clear:both;">';
     echo $data['tree-padding'] . $data['title'];
     echo '</div>';
     foreach ($node->getChildren() as $child) {
         $child->accept($this);
     }
 }
Exemplo n.º 3
0
 public function __construct(TreeNode $node)
 {
     parent::__construct($node->getData(), $node->getId());
     $this->setChildren($node->getChildren());
     $this->setObject($node->getObject());
 }
Exemplo n.º 4
0
 public function visit(TreeNode $node)
 {
     $html = '';
     $row = $node->getData();
     $artifact = $this->artifact_factory->getArtifactById($row['id']);
     if ($artifact) {
         $html .= '<tr id="tree-node-' . $row['id'] . '" class="' . html_get_alt_row_color($this->current_index++) . '" >';
         $html .= '<td class="first-column">';
         $html .= $row['tree-padding'];
         $html .= sprintf($row['content-template'], $artifact->fetchDirectLinkToArtifact());
         $html .= '</td>';
         $html .= $this->fetchColumnsValues($artifact, $row);
         $html .= '</tr>';
         foreach ($node->getChildren() as $child) {
             $html .= $child->accept($this);
         }
     }
     return $html;
 }