CoolCMS API

ModalTrait

Requires in the host class: - $this->modalRegistry (ModalRegistry) - $this->eventDispatcher (EventDispatcher) - $this->translator - $this->translatorDomain - $this->watchdogId (int) - getFormModalTarget(): string - getDeleteModalTarget(): string - createFormContent(): string - createSuccessContent(): string - createDeleteContent(): string - createDeleteResultContent(bool): string - updateModalContent(string, string): void

Table of Contents

Methods

handleDelete()  : void
handleShowDeleteModal()  : void
handleShowFormModal()  : void
createDeleteContent()  : string
createDeleteResultContent()  : string
createFormContent()  : string
createModalEvent()  : ModalWindowEvent
createSuccessContent()  : string
updateModalContent()  : void

Methods

handleDelete()

public handleDelete(int $watchdogId) : void
Parameters
$watchdogId : int

handleShowDeleteModal()

public handleShowDeleteModal(int $watchdogId) : void
Parameters
$watchdogId : int

handleShowFormModal()

public handleShowFormModal([int $watchdogId = 0 ]) : void
Parameters
$watchdogId : int = 0

createDeleteContent()

private createDeleteContent() : string
Return values
string

createDeleteResultContent()

private createDeleteResultContent(bool $success) : string
Parameters
$success : bool
Return values
string

createFormContent()

private createFormContent() : string
Return values
string

createModalEvent()

private createModalEvent(string $content, string $target[, array<string, mixed> $extraOptions = [] ]) : ModalWindowEvent
Parameters
$content : string
$target : string
$extraOptions : array<string, mixed> = []
Return values
ModalWindowEvent

createSuccessContent()

private createSuccessContent() : string
Return values
string

updateModalContent()

private updateModalContent(string $content, string $target) : void
Parameters
$content : string
$target : string
On this page

Search results