Licence: MIT
{
"require": {
"illagrenan/nette-bootstrap-alert-control": "dev-master"
}
}
Závislosti:
Vytvoření komponenty v presenteru
<?php
protected function createComponentTWAlerts($name)
{
$twAlerts = new \Illagrenan\BootstrapAlert\BootstrapAlert($this, $name);
return $twAlerts;
}
?>
Použití v šabloně
{* Bude vykresleno jako blok *}
{widget tWAlerts "Na druhou kolej přijel osobní vlak z Pardubic", "Upozornění pro cestující", \Illagrenan\BootstrapAlert\AlertType::INFO()}
{* Vykreslíme inline s defaultním stylem "Warning" *}
{widget tWAlerts "Natala neznámá chyba"}