상속: extends DataModel
예제 #1
0
 public function onAfterDelete($oid)
 {
     if (isset($this->methods['onAfterDelete'])) {
         $func = $this->methods['onAfterDelete'];
         return call_user_func_array($func, array($this, $oid));
     }
     return parent::onAfterDelete($oid);
 }
예제 #2
0
 /**
  * Returns true if both this node and $otherNode are root, leaf or child (same tree scope)
  *
  * @param TreeModel $otherNode
  *
  * @return bool
  */
 public function inSameScope(TreeModel $otherNode)
 {
     if ($this->isLeaf()) {
         return $otherNode->isLeaf();
     } elseif ($this->isRoot()) {
         return $otherNode->isRoot();
     } elseif ($this->isChild()) {
         return $otherNode->isChild();
     } else {
         return false;
     }
 }