The Drago Extension is a package built on top of the Nette Framework, designed to provide several useful components for your web applications. Below are the classes in the extension and how you can use them.
- PHP 8.3 or higher
- composer
composer require drago-ex/application
$this->getSignal();
Shorter method in control.
$this->isAjax();
$form = $this['factory'];
$submitButton = $this->getFormComponent($form, 'submit');
$submitButton->setCaption('Edit');
It is used in the bow of presenters or control
/**
* @property-read Drago\Application\UI\ExtraTemplate $template
*/
class Presenter {}
In Latte, we will use these macros to insert into the template, which will tell us the variables and types that can be used by default in the template.
{templateType Drago\Application\UI\ExtraTemplate}
{varType Drago\Application\UI\Flashes[] $flashes}
<div n:foreach="$flashes as $flash" n:class="flash, $flash->type">{$flash->message}</div>