protected function setArtifactLinks(TreeNode $node, $artifactLinks) { if (is_array($artifactLinks)) { $artifactLinks = implode(', ', $artifactLinks); } $nodeData = $node->getData(); $nodeData['artifactlinks'] = $artifactLinks; $node->setData($nodeData); return $node; }
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); } }
public function __construct(TreeNode $node) { parent::__construct($node->getData(), $node->getId()); $this->setChildren($node->getChildren()); $this->setObject($node->getObject()); }
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; }