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 TDataGridActionGroup.php

Documentation is available at TDataGridActionGroup.php

  1. <?php
  2. namespace Adianti\Widget\Datagrid;
  3.  
  4. use Adianti\Control\TAction;
  5.  
  6. /**
  7.  * Represents a group of Actions for datagrids
  8.  *
  9.  * @version    7.4
  10.  * @package    widget
  11.  * @subpackage datagrid
  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. {
  17.     private $actions;
  18.     private $headers;
  19.     private $separators;
  20.     private $label;
  21.     private $icon;
  22.     private $index;
  23.     
  24.     /**
  25.      * Constructor
  26.      * @param $label Action Group label
  27.      * @param $icon  Action Group icon
  28.      */
  29.     public function __construct$label$icon NULL)
  30.     {
  31.         $this->index 0;
  32.         $this->actions array();
  33.         $this->label $label;
  34.         $this->icon $icon;
  35.     }
  36.     
  37.     /**
  38.      * Returns the Action Group label
  39.      */
  40.     public function getLabel()
  41.     {
  42.         return $this->label;
  43.     }
  44.     
  45.     /**
  46.      * Returns the Action Group icon
  47.      */
  48.     public function getIcon()
  49.     {
  50.         return $this->icon;
  51.     }
  52.     
  53.     /**
  54.      * Add an action to the actions group
  55.      * @param $action TAction object
  56.      */
  57.     public function addAction(TAction $action)
  58.     {
  59.         $this->actions$this->index $action;
  60.         $this->index ++;
  61.     }
  62.     
  63.     /**
  64.      * Add a separator
  65.      */
  66.     public function addSeparator()
  67.     {
  68.         $this->separators$this->index TRUE;
  69.         $this->index ++;
  70.     }
  71.     
  72.     /**
  73.      * Add a header
  74.      * @param $header Options header
  75.      */
  76.     public function addHeader($header)
  77.     {
  78.         $this->headers$this->index $header;
  79.         $this->index ++;
  80.     }
  81.     
  82.     /**
  83.      * Returns the actions
  84.      */
  85.     public function getActions()
  86.     {
  87.         return $this->actions;
  88.     }
  89.     
  90.     /**
  91.      * Returns the headers
  92.      */
  93.     public function getHeaders()
  94.     {
  95.         return $this->headers;
  96.     }
  97.     
  98.     /**
  99.      * Returns the separators
  100.      */
  101.     public function getSeparators()
  102.     {
  103.         return $this->separators;
  104.     }
  105. }