/** * Returns the application login View (/core/app-login) so the user can * potentially gain core admin access. * * @param string $referrerUrl After a successful login, the user will be redirected here * @return View */ public static function getLoginView($referrerUrl = null) { // Create the view $command = UrlCommand::create('/core/app-login'); $view = $command->execute(); $view->refererUrl = $referrerUrl; // Result return $view; }
/** * Executes the "/global-view" UrlCommand, stores the resulting View in the * cached self::$globalView property and returns it. * * @return View */ public static function getGlobalView() { if (self::$globalView === null) { $gvCommand = UrlCommand::create('/global-view'); self::$globalView = $gvCommand->execute(); } return self::$globalView; }