https://github.com/drago-ex/application
:mega: Extension for Nette Framework, providing reusable UI components, alert types, and flash message handling.
https://github.com/drago-ex/application
application nette
Last synced: 4 months ago
JSON representation
:mega: Extension for Nette Framework, providing reusable UI components, alert types, and flash message handling.
- Host: GitHub
- URL: https://github.com/drago-ex/application
- Owner: drago-ex
- License: mit
- Created: 2015-10-19T06:19:16.000Z (over 10 years ago)
- Default Branch: master
- Last Pushed: 2025-12-30T07:48:08.000Z (6 months ago)
- Last Synced: 2026-01-09T01:47:03.604Z (6 months ago)
- Topics: application, nette
- Language: PHP
- Homepage:
- Size: 218 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: readme.md
- License: license
Awesome Lists containing this project
README
## Drago Application
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.
[](https://raw.githubusercontent.com/drago-ex/application/master/license)
[](https://badge.fury.io/ph/drago-ex%2Fapplication)
[](https://github.com/drago-ex/application/actions/workflows/coding-style.yml)
[](https://www.codefactor.io/repository/github/drago-ex/application)
## Requirements
- PHP >= 8.3
- Nette Framework
- Composer
- Bootstrap
- Naja
## Installation
```
composer require drago-ex/application
```
## Check if there is a pair signal receiver and name (default is edit).
```php
$this->getSignal();
```
## Is AJAX request?
Shorter method in control.
```php
$this->isAjax();
```
## Retrieves a form component by its name.
```php
$form = $this['factory'];
$submitButton = $this->getFormComponent($form, 'submit');
$submitButton->setCaption('Edit');
```
## Base template class extending Nette Template.
It is used in the bow of presenters or control
```php
/**
* @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.
```latte
{templateType Drago\Application\UI\ExtraTemplate}
{varType Drago\Application\UI\Flashes[] $flashes}
{$flash->message}
```
## Flash message alert type
- [Alert](https://github.com/drago-ex/application/blob/master/src/Drago/Application/UI/Alert.php)
## Toast - Bootstrap and naja component for flash messages
```JavaScript
import BootstrapComponents from 'path/to/naja.toast';
```
## Using toast in a latte template
```latte
{include 'path/to/@toast.latte', flashes => $flashes}
```
Copy the Latte template from assets to your project.