diff --git a/modules/backend/controllers/auth/signin.htm b/modules/backend/controllers/auth/signin.htm index f5ddccf52..4271bcdf0 100644 --- a/modules/backend/controllers/auth/signin.htm +++ b/modules/backend/controllers/auth/signin.htm @@ -26,6 +26,7 @@ autocomplete="off" maxlength="255" /> + @@ -38,6 +39,7 @@

- - \ No newline at end of file + + +fireViewEvent('backend.auth.extendSigninView') ?> diff --git a/modules/system/traits/ViewMaker.php b/modules/system/traits/ViewMaker.php index 97e1dfe58..086642c7d 100644 --- a/modules/system/traits/ViewMaker.php +++ b/modules/system/traits/ViewMaker.php @@ -2,6 +2,7 @@ use File; use Lang; +use Event; use Block; use SystemException; @@ -233,4 +234,20 @@ trait ViewMaker $guessedPath = $classFile ? $classFile . '/' . $classFolder . $suffix : null; return ($isPublic) ? File::localToPublic($guessedPath) : $guessedPath; } + + /** + * Special event function used for extending within view files + * @param string $event Event name + * @param array $params Event parameters + * @return string + */ + public function fireViewEvent($event, $params = []) + { + // Add the local object to the first parameter always + array_unshift($params, $this); + + if ($result = Event::fire($event, $params)) { + return implode(PHP_EOL.PHP_EOL, (array) $result); + } + } }