Example #1
0
 /**
  * Function	findChild()
  * ------------------------------------
  * @desc	find all child node of current node
  * @param	(no need)
  * @return	(no need)
  */
 public function findChild()
 {
     $tmp = new MTreeNodes();
     $children = $tmp->searchChild($this->id);
     if (count($children) > 0) {
         foreach ($children as $obj) {
             $eachChild = TreeNode::getInstance($obj->id, $obj->data, $obj->parent_id, $obj->type, $obj->label, $obj->data);
             $this->addChild($eachChild);
         }
     }
 }