public function hasChildren()
{
if ($this->getType() == "folder") {
if (is_bool($this->hasChilds)) {
if ($this->hasChilds and empty($this->childs) or !$this->hasChilds and !empty($this->childs)) {
return $this->getDao()->hasChilds();
} else {
return $this->hasChilds;
}
}
return $this->getDao()->hasChilds();
}
return false;
}