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

Documentation is available at TDBSelect.php

  1. <?php
  2. namespace Adianti\Widget\Wrapper;
  3.  
  4. use Adianti\Widget\Form\TSelect;
  5. use Adianti\Database\TCriteria;
  6.  
  7. use Exception;
  8.  
  9. /**
  10.  * Database Select Widget
  11.  *
  12.  * @version    7.4
  13.  * @package    widget
  14.  * @subpackage wrapper
  15.  * @author     Pablo Dall'Oglio
  16.  * @copyright  Copyright (c) 2006 Adianti Solutions Ltd. (http://www.adianti.com.br)
  17.  * @license    http://www.adianti.com.br/framework-license
  18.  */
  19. class TDBSelect extends TSelect
  20. {
  21.     protected $items// array containing the combobox options
  22.     
  23.     use AdiantiDatabaseWidgetTrait;
  24.     
  25.     /**
  26.      * Class Constructor
  27.      * @param  $name     widget's name
  28.      * @param  $database database name
  29.      * @param  $model    model class name
  30.      * @param  $key      table field to be used as key in the combo
  31.      * @param  $value    table field to be listed in the combo
  32.      * @param  $ordercolumn column to order the fields (optional)
  33.      * @param  $criteria criteria (TCriteria object) to filter the model (optional)
  34.      */
  35.     public function __construct($name$database$model$key$value$ordercolumn NULLTCriteria $criteria NULL)
  36.     {
  37.         // executes the parent class constructor
  38.         parent::__construct($name);
  39.         
  40.         // load items
  41.         parent::addItemsself::getItemsFromModel($database$model$key$value$ordercolumn$criteria) );
  42.     }
  43. }