/** * The icon of the entry */ public function getIcon() { return \Paladin\Paladin::getRootFolder() . \Paladin\PaladinTwigExtension::getFile("Dashboard", "images/fileexplorer.png", true, "resources"); }
/** * Display an error page * * @param errorType * The type of the error * @param errorDescription * The description of the error * @param errorBacktrace * The backtrace of the error */ public static function displayErrorPage($errorType, $errorDescription, $errorBacktrace) { // Getting the error page $errorPage = file_get_contents(self::$errorPageLocation); // Replacing the variables, with the messages, the title, etc... $errorPage = str_replace("__ROOT_DIR__", \Paladin\Paladin::getRootFolder(), $errorPage); $errorPage = str_replace("__MESSAGE__", $errorDescription, $errorPage); $errorPage = str_replace("__TITLE__", $errorType, $errorPage); $errorPage = str_replace("__BG_LOCATION__", \Paladin\Paladin::getRootFolder() . \Paladin\PaladinTwigExtension::getFile("shared", "background.png", true, "resources"), $errorPage); if (function_exists('debug_backtrace')) { $errorPage = str_replace("<!-- __BACKTRACE__ -->", $errorBacktrace, $errorPage); } // Then diplaying it echo $errorPage; }