ModalTrait
Modal display of the login form.
Requires in the host class:
$this->modalRegistry(ModalRegistry)$this->eventDispatcher(EventDispatcher)$this->translator$this->translatorDomain$this->user(Nette\Security\User)getModalTarget(): string
Table of Contents
Properties
- $inModal : bool
Methods
- handleShowLoginModal() : void
- Signal that shows the login modal.
- isInModal() : bool
- renderInModal() : void
- Renders the button that opens the login modal.
- createModalContent() : string
- Creates the modal content (the form).
- createModalEvent() : ModalWindowEvent
- Creates the `ModalWindowEvent` with options.
- createSuccessContent() : string
- Creates the content after a successful sign-in.
- handleLoginModalResult() : void
- Handles the sign-in result in the modal.
- updateModalContent() : void
- Updates the modal content.
Properties
$inModal
private
bool
$inModal
= false
Methods
handleShowLoginModal()
Signal that shows the login modal.
public
handleShowLoginModal() : void
isInModal()
public
isInModal() : bool
Return values
boolrenderInModal()
Renders the button that opens the login modal.
public
renderInModal() : void
createModalContent()
Creates the modal content (the form).
private
createModalContent() : string
Return values
stringcreateModalEvent()
Creates the `ModalWindowEvent` with options.
private
createModalEvent(string $content[, array<string, mixed> $extraOptions = [] ]) : ModalWindowEvent
Parameters
- $content : string
- $extraOptions : array<string, mixed> = []
Return values
ModalWindowEventcreateSuccessContent()
Creates the content after a successful sign-in.
private
createSuccessContent() : string
Return values
stringhandleLoginModalResult()
Handles the sign-in result in the modal.
private
handleLoginModalResult() : void
updateModalContent()
Updates the modal content.
private
updateModalContent(string $content) : void
Parameters
- $content : string