src/wcmf/application/controller/TreeController.php
protected function getViewNode(Node $node, $displayText='') {
    if (strlen($displayText) == 0) {
      $displayText = trim($this->getDisplayText($node));
    }
    if (strlen($displayText) == 0) {
      $displayText = '-';
    }
    $oid = $node->getOID();
    $isFolder = $oid->containsDummyIds();
    $hasChildren = $this->isRootTypeNode($oid) || sizeof($node->getNumChildren()) > 0;
    return [
      'oid' => $node->getOID()->__toString(),
      'displayText' => $displayText,
      'isFolder' => $isFolder,
      'hasChildren' => $hasChildren
    ];
  }
protected function getViewNode(Node $node, $displayText='') {
    if (strlen($displayText) == 0) {
      $displayText = trim($this->getDisplayText($node));
    }
    if (strlen($displayText) == 0) {
      $displayText = '-';
    }
    $oid = $node->getOID();
    $isFolder = $oid->containsDummyIds();
    $hasChildren = $this->isRootTypeNode($oid) || sizeof($node->getNumChildren()) > 0;
    return [
      'oid' => $node->getOID()->__toString(),
      'displayText' => $displayText,
      'isFolder' => $isFolder,
      'hasChildren' => $hasChildren
    ];
  }
protected function getViewNode ( Node $ node , $ displayText = '' ) { if ( strlen ( $ displayText ) == 0 ) { $ displayText = trim ( $ this -> getDisplayText ( $ node ) ) ; } if ( strlen ( $ displayText ) == 0 ) { $ displayText = '-' ; } $ oid = $ node -> getOID ( ) ; $ isFolder = $ oid -> containsDummyIds ( ) ; $ hasChildren = $ this -> isRootTypeNode ( $ oid ) || sizeof ( $ node -> getNumChildren ( ) ) > 0 ; return [ 'oid' => $ node -> getOID ( ) -> __toString ( ) , 'displayText' => $ displayText , 'isFolder' => $ isFolder , 'hasChildren' => $ hasChildren ] ; }
Get the view of a Node
@param $node The Node to create the view for
@param $displayText The text to display (will be taken from TreeController::getDisplayText() if not specified) (default: '')
@return An associative array whose keys correspond to Ext.tree.TreeNode config parameters
Get the view of a Node