public function hasChildren() { if (is_array($this->childs) && count($this->childs) > 0) { return true; } return false; }