Lançado Adianti Framework 7.6!
Clique aqui para saber mais
menu

Adianti Solutions

API

Adianti, Framework, PHP, MVC, Active record, Front controller, IDE, RAD, Web, multiplataforma, geração de código, desenvolvimento rápido, relatórios, formulários, listagens, datagrids, gráficos, banco de dados, padrões de projeto, design patterns API do Adianti Framework.
API Docs
code
Selecione a classe

Source for file TAlert.php

Documentation is available at TAlert.php

  1. <?php
  2. namespace Adianti\Widget\Dialog;
  3.  
  4. use Adianti\Widget\Base\TElement;
  5.  
  6. /**
  7.  * Alert
  8.  *
  9.  * @version    7.4
  10.  * @package    widget
  11.  * @subpackage dialog
  12.  * @author     Pablo Dall'Oglio
  13.  * @copyright  Copyright (c) 2006 Adianti Solutions Ltd. (http://www.adianti.com.br)
  14.  * @license    http://www.adianti.com.br/framework-license
  15.  */
  16. class TAlert extends TElement
  17. {
  18.     /**
  19.      * Class Constructor
  20.      * @param $type    Type of the alert (success, info, warning, danger)
  21.      * @param $message Message to be shown
  22.      */
  23.     public function __construct($type$message)
  24.     {
  25.         parent::__construct('div');
  26.         $this->{'class''talert alert alert-dismissible alert-'.$type;
  27.         $this->{'role'}  'alert';
  28.         
  29.         $button new TElement('button');
  30.         $button->{'type''button';
  31.         $button->{'class''close';
  32.         $button->{'data-dismiss''alert';
  33.         $button->{'aria-label'}   'Close';
  34.         
  35.         $span new TElement('span');
  36.         $span->{'aria-hidden''true';
  37.         $span->add('&times;');
  38.         $button->add($span);
  39.         
  40.         parent::add($button);
  41.         parent::add($message);
  42.     }
  43. }