Adds new view event system, add event to sign in form
This commit is contained in:
parent
b39837834b
commit
7f502768dc
|
|
@ -26,6 +26,7 @@
|
||||||
autocomplete="off"
|
autocomplete="off"
|
||||||
maxlength="255" />
|
maxlength="255" />
|
||||||
|
|
||||||
|
<!-- Submit Login -->
|
||||||
<button type="submit" class="btn btn-primary login-button">
|
<button type="submit" class="btn btn-primary login-button">
|
||||||
<?= e(trans('backend::lang.account.login')) ?>
|
<?= e(trans('backend::lang.account.login')) ?>
|
||||||
</button>
|
</button>
|
||||||
|
|
@ -38,6 +39,7 @@
|
||||||
</a>
|
</a>
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
<!-- Submit Login -->
|
|
||||||
</div>
|
</div>
|
||||||
<?= Form::close() ?>
|
<?= Form::close() ?>
|
||||||
|
|
||||||
|
<?= $this->fireViewEvent('backend.auth.extendSigninView') ?>
|
||||||
|
|
|
||||||
|
|
@ -2,6 +2,7 @@
|
||||||
|
|
||||||
use File;
|
use File;
|
||||||
use Lang;
|
use Lang;
|
||||||
|
use Event;
|
||||||
use Block;
|
use Block;
|
||||||
use SystemException;
|
use SystemException;
|
||||||
|
|
||||||
|
|
@ -233,4 +234,20 @@ trait ViewMaker
|
||||||
$guessedPath = $classFile ? $classFile . '/' . $classFolder . $suffix : null;
|
$guessedPath = $classFile ? $classFile . '/' . $classFolder . $suffix : null;
|
||||||
return ($isPublic) ? File::localToPublic($guessedPath) : $guessedPath;
|
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);
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue