Exemplo n.º 1
0
 /**
  * @return int
  */
 public function getChildrenCount()
 {
     if ($this->isNew()) {
         return 0;
     }
     $ret = parent::getChildrenCount();
     if (!is_null($ret)) {
         return $ret;
     }
     $ret = 0;
     foreach ($this->getChildren() as $child) {
         $ret++;
         $ret += $child->getChildrenCount();
     }
     return $ret;
 }