public function getHasSub() { if (($children = $this->getEntity()->getChildren()) !== null) { return $children->count() > 0; } return false; }