get(); if (!$collection->isEmpty()){ return $collection; } return false; } public static function hasActiveChild(int $id): bool { $child = self::getChild($id); if (!$child->isEmpty()){ foreach ($child as $item){ // if ($item->url === \kernel\Request::getUrlPath()){ // return true; // } if (strripos(Request::getUrlPath(), $item->url) !== false) { return true; } } } return false; } public static function getActiveStatus($url) { if ($url === Request::getUrlPath()){ return true; } else { if (strripos(\kernel\Request::getUrlPath(), ($url . "/page")) !== false) { return true; } } return false; } }