CoolCMS API

ModalHostTrait

Host trait of the shared admin {@see ModalWindow}. {@see \App\Core\Base\Admin\BasePresenter} uses it, so the modal is available in every admin presenter and its components without per-presenter wiring.

Mount: {control modalWindow} at the end of @layout.latte (createComponentModalWindow()). Usage from a presenter: $this->getModalWindow()->setTitle(...)->setContent(...)->open(); from a component see ModalAwareTrait.

Table of Contents

Properties

$modalWindowFactory  : ModalWindowFactory
Injected through Nette presenter inject (after construction), not the constructor.

Methods

getModalWindow()  : ModalWindow
createComponentModalWindow()  : ModalWindow

Properties

$modalWindowFactory

Injected through Nette presenter inject (after construction), not the constructor.

public ModalWindowFactory $modalWindowFactory
Attributes
#[Inject]

Methods

On this page

Search results