本文整理汇总了PHP中TVBox类的典型用法代码示例。如果您正苦于以下问题:PHP TVBox类的具体用法?PHP TVBox怎么用?PHP TVBox使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
在下文中一共展示了TVBox类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的PHP代码示例。
示例1: __construct
/**
* Class constructor
* Creates the page and the registration form
*/
function __construct()
{
parent::__construct();
parent::setDatabase('samples');
// defines the database
parent::setActiveRecord('City');
// defines the active record
// creates the form
$this->form = new TQuickForm('form_City');
$this->form->class = 'tform';
// CSS class
$this->form->style = 'width: 500px';
// define the form title
$this->form->setFormTitle('Standard Form');
// create the form fields
$id = new TEntry('id');
$name = new TEntry('name');
$id->setEditable(FALSE);
// add the form fields
$this->form->addQuickField('ID', $id, 100);
$this->form->addQuickField('Name', $name, 100);
// define the form action
$this->form->addQuickAction('Save', new TAction(array($this, 'onSave')), 'ico_save.png');
$this->form->addQuickAction('New', new TAction(array($this, 'onEdit')), 'ico_new.png');
$this->form->addQuickAction('Listing', new TAction(array('StandardDataGridView', 'onReload')), 'ico_datagrid.gif');
// wrap the page content using vertical box
$vbox = new TVBox();
$vbox->add(new TXMLBreadCrumb('menu.xml', __CLASS__));
$vbox->add($this->form);
parent::add($vbox);
}
开发者ID:jfrank1500,项目名称:curso_php,代码行数:35,代码来源:StandardFormView.class.php
示例2: __construct
public function __construct()
{
parent::__construct();
$this->form = new TForm();
// creates one datagrid
$this->datagrid = new TQuickGrid();
$this->datagrid->disableDefaultClick();
// important!
$this->form->add($this->datagrid);
// add the columns
$this->datagrid->addQuickColumn('Check', 'check', 'right', 40);
$this->datagrid->addQuickColumn('Code', 'code', 'right', 70);
$this->datagrid->addQuickColumn('Name', 'name', 'left', 180);
$this->datagrid->addQuickColumn('Address', 'address', 'left', 180);
$this->datagrid->addQuickColumn('Phone', 'fone', 'left', 120);
// creates the datagrid model
$this->datagrid->createModel();
// creates the action button
$button1 = new TButton('action1');
// define the button action
$button1->setAction(new TAction(array($this, 'onSave')), 'Save');
$button1->setImage('ico_save.png');
$this->form->addField($button1);
// wrap the page content using vertical box
$vbox = new TVBox();
$vbox->add(new TXMLBreadCrumb('menu.xml', __CLASS__));
$vbox->add($this->form);
$vbox->add($button1);
parent::add($vbox);
}
开发者ID:jfrank1500,项目名称:curso_php,代码行数:30,代码来源:DatagridCheckView.class.php
示例3: __construct
/**
* Class constructor
* Creates the page and the registration form
*/
function __construct()
{
parent::__construct();
// creates the form
$this->form = new TForm('form_Customer');
try {
// UIBuilder object
$ui = new TUIBuilder(500, 340);
$ui->setController($this);
$ui->setForm($this->form);
// reads the xml form
$ui->parseFile('app/forms/customerlist.form.xml');
$this->datagrid = $ui->getWidget('datagrid1');
$this->pageNavigation = $this->datagrid->getPageNavigation();
$this->form->add($ui);
$this->form->setFields($ui->getFields());
} catch (Exception $e) {
new TMessage('error', $e->getMessage());
}
// wrap the page content using vertical box
$vbox = new TVBox();
$vbox->add(new TXMLBreadCrumb('menu.xml', __CLASS__));
$vbox->add($this->form);
parent::add($vbox);
}
开发者ID:jfrank1500,项目名称:curso_php,代码行数:29,代码来源:DesignedDataGridView.class.php
示例4: __construct
public function __construct()
{
parent::__construct();
$this->form = new TForm();
// creates one datagrid
$this->datagrid = new TQuickGrid();
$this->datagrid->disableDefaultClick();
$this->form->add($this->datagrid);
// creates the action button
$button1 = new TButton('action1');
// define the button action
$action_button1 = new TAction(array($this, 'onUpdate'));
$action_button1->setParameter('id', filter_input(INPUT_GET, 'id'));
$button1->setAction($action_button1, 'Atualizar');
$button1->setImage('fa:check-circle-o green');
$this->form->addField($button1);
// add the columns
$this->datagrid->addQuickColumn('Tipo de Atividade', 'nome', 'left', 180);
$this->datagrid->addQuickColumn('Ticket', 'ticket', 'left', 180);
$this->datagrid->addQuickColumn('Sistema', 'sistema', 'left', 180);
// creates the datagrid model
$this->datagrid->createModel();
// wrap the page content using vertical box
$vbox = new TVBox();
$vbox->add($button1);
$vbox->add($this->form);
parent::add($vbox);
}
开发者ID:jhonleandres,项目名称:Atividades,代码行数:28,代码来源:TipoAtividadesVinculos.class.php
示例5: __construct
/**
* Class constructor
*/
function __construct()
{
parent::__construct();
// creates the form
$this->form = new TForm('form_pdf_shapes');
// creates a table
$table = new TTable();
// add the table inside the form
$this->form->add($table);
// create the form fields
$name = new TEntry('name');
$name->addValidation('Name', new TRequiredValidator());
$label = new TLabel('Name' . ': ');
$label->setFontColor('red');
$table->addRowSet($label, $name);
$save_button = new TButton('generate');
$save_button->setAction(new TAction(array($this, 'onGenerate')), 'Generate');
$save_button->setImage('ico_save.png');
// add a row for the form action
$table->addRowSet($save_button);
// define wich are the form fields
$this->form->setFields(array($name, $save_button));
// wrap the page content using vertical box
$vbox = new TVBox();
$vbox->add(new TXMLBreadCrumb('menu.xml', __CLASS__));
$vbox->add($this->form);
parent::add($vbox);
}
开发者ID:jfrank1500,项目名称:curso_php,代码行数:31,代码来源:PDFDesignShapesView.class.php
示例6: __construct
public function __construct()
{
parent::__construct();
// creates one datagrid
$this->datagrid = new TDataGrid();
// create the datagrid columns
$code = new TDataGridColumn('code', 'Code', 'right', 70);
$name = new TDataGridColumn('name', 'Name', 'left', 180);
$address = new TDataGridColumn('address', 'Address', 'left', 180);
$telephone = new TDataGridColumn('fone', 'Phone', 'left', 160);
// add the columns to the datagrid
$this->datagrid->addColumn($code);
$this->datagrid->addColumn($name);
$this->datagrid->addColumn($address);
$this->datagrid->addColumn($telephone);
// creates two datagrid actions
$action1 = new TDataGridAction(array($this, 'onView'));
$action1->setLabel('View');
$action1->setImage('ico_find.png');
$action1->setField('name');
$action1->setDisplayCondition(array($this, 'displayColumn'));
// add the actions to the datagrid
$this->datagrid->addAction($action1);
// creates the datagrid model
$this->datagrid->createModel();
// wrap the page content using vertical box
$vbox = new TVBox();
$vbox->add(new TXMLBreadCrumb('menu.xml', __CLASS__));
$vbox->add($this->datagrid);
parent::add($vbox);
}
开发者ID:jfrank1500,项目名称:curso_php,代码行数:31,代码来源:DatagridConditionalActionView.class.php
示例7: __construct
/**
* Class constructor
* Creates the page
*/
function __construct()
{
parent::__construct();
// create the form
$this->form = new TForm();
// create the form fields
$html = new THtmlEditor('html_text');
$html->setSize(500, 200);
// creates the action button
$button1 = new TButton('action1');
$button1->setAction(new TAction(array($this, 'onShow')), 'Show');
$button1->setImage('ico_apply.png');
// creates the table wrapper and put it inside the form
$table = new TTable();
$this->form->add($table);
// pack elements
$table->addRow()->addCell(new TLabel('HTML:'));
$table->addRow()->addCell($html);
$table->addRow()->addCell($button1);
// define wich are the form fields
$this->form->setFields(array($html, $button1));
// wrap the page content using vertical box
$vbox = new TVBox();
$vbox->add(new TXMLBreadCrumb('menu.xml', __CLASS__));
$vbox->add($this->form);
parent::add($vbox);
}
开发者ID:jfrank1500,项目名称:curso_php,代码行数:31,代码来源:FormHtmlEditorView.class.php
示例8: __construct
/**
* Class constructor
* Creates the page and the registration form
*/
function __construct()
{
parent::__construct();
// creates the form
$this->form = new TForm('form_Teste');
try {
// TUIBuilder object
$ui = new TUIBuilder(500, 400);
$ui->setController($this);
$ui->setForm($this->form);
// reads the xml form
$ui->parseFile('app/forms/datagrid.form.xml');
// get the datagrid
$this->datagrid = $ui->getWidget('datagrid');
// put the TUIBuilder panel inside the TForm object
$this->form->add($ui);
// set form fields from interface fields
$this->form->setFields($ui->getFields());
} catch (Exception $e) {
new TMessage('error', $e->getMessage());
}
// wrap the page content using vertical box
$vbox = new TVBox();
$vbox->add(new TXMLBreadCrumb('menu.xml', __CLASS__));
$vbox->add($this->form);
parent::add($vbox);
}
开发者ID:jfrank1500,项目名称:curso_php,代码行数:31,代码来源:DesignDataGridView.class.php
示例9: __construct
/**
* Class constructor
* Creates the page
*/
function __construct()
{
parent::__construct();
// create the form using TQuickForm class
$this->form = new BootstrapFormWrapper(new TQuickForm());
$this->form->setFormTitle('cadastroTarefas');
// create the form fields
$id = new TEntry('id');
$id->setEditable(FALSE);
$description = new TEntry('titulo');
$list = new TCombo('prioridade');
$text = new TText('descricao');
$combo_items = array();
$combo_items['1'] = 'Baixa';
$combo_items['2'] = 'Media';
$combo_items['3'] = 'Alta';
$list->addItems($combo_items);
// add the fields inside the form
$this->form->addQuickField('Id', $id, 40);
$this->form->addQuickField('Título', $description, 250);
$this->form->addQuickField('Descrição', $text, 120);
$this->form->addQuickField('Prioridade', $list, 120);
$text->setSize(250, 50);
// define the form action
$btn = $this->form->addQuickAction('Save', new TAction(array($this, 'onSave')), 'fa:save');
$btn->class = 'btn btn-success';
$panel = new TPanelGroup('Cadastro de taredas');
$panel->add($this->form);
// wrap the page content using vertical box
$vbox = new TVBox();
$vbox->add($panel);
parent::add($vbox);
}
开发者ID:GustavoEmmel,项目名称:exercicioPHP,代码行数:37,代码来源:FormBootstrapView.class.php
示例10: __construct
public function __construct()
{
parent::__construct();
$this->datagrid = new TQuickGrid();
$this->datagrid->setHeight(320);
// define the CSS class
$this->datagrid->class = 'customized-table';
// import the CSS file
parent::include_css('app/resources/custom-table.css');
// add the columns
$this->datagrid->addQuickColumn('ID', 'id', 'left', 50);
$this->datagrid->addQuickColumn('Description', 'description', 'left', 250);
$this->datagrid->addQuickColumn('Amount', 'amount', 'right', 140);
$this->datagrid->addQuickColumn('Price', 'sale_price', 'right', 140);
// add the actions
$this->datagrid->addQuickAction('Delete', new TDataGridAction(array($this, 'onDelete')), 'id', 'ico_delete.png');
// creates the datagrid model
$this->datagrid->createModel();
$form_back = new TQuickForm();
$form_back->addQuickAction('Back', new TAction(array($this, 'onGoToCatalog')), 'ico_back.png');
// wrap the page content using vertical box
$vbox = new TVBox();
$vbox->add(new TXMLBreadCrumb('menu.xml', 'ProductCatalogView'));
$vbox->add($this->datagrid);
$vbox->add($form_back);
parent::add($vbox);
}
开发者ID:jfrank1500,项目名称:curso_php,代码行数:27,代码来源:CartManagementView.class.php
示例11: __construct
public function __construct()
{
parent::__construct();
// creates one datagrid
$this->datagrid = new TDataGrid();
// create the datagrid columns
$code = new TDataGridColumn('code', 'Code', 'left', 50);
$name = new TDataGridColumn('name', 'Name', 'left', 180);
$address = new TDataGridColumn('address', 'Address', 'left', 140);
$telephone = new TDataGridColumn('fone', 'Phone', 'center', 100);
// add the columns to the datagrid
$this->datagrid->addColumn($code);
$this->datagrid->addColumn($name);
$this->datagrid->addColumn($address);
$this->datagrid->addColumn($telephone);
$action1 = new TAction(array($this, 'onColumnAction'));
$action1->setParameter('column', 'code');
$code->setAction($action1);
$action2 = new TAction(array($this, 'onColumnAction'));
$action2->setParameter('column', 'name');
$name->setAction($action2);
// creates the datagrid model
$this->datagrid->createModel();
// wrap the page content using vertical box
$vbox = new TVBox();
$vbox->add(new TXMLBreadCrumb('menu.xml', __CLASS__));
$vbox->add($this->datagrid);
parent::add($vbox);
}
开发者ID:jfrank1500,项目名称:curso_php,代码行数:29,代码来源:DatagridColumnActionsView.class.php
示例12: __construct
public function __construct()
{
parent::__construct();
// creates one datagrid
$this->datagrid = new TDataGrid();
// make scrollable and define height
$this->datagrid->setHeight(300);
$this->datagrid->makeScrollable();
// create the datagrid columns
$code = new TDataGridColumn('code', 'Code', 'right', 70);
$name = new TDataGridColumn('name', 'Name', 'left', 180);
$address = new TDataGridColumn('address', 'Address', 'left', 180);
$telephone = new TDataGridColumn('fone', 'Phone', 'left', 160);
// add the columns to the datagrid
$this->datagrid->addColumn($code);
$this->datagrid->addColumn($name);
$this->datagrid->addColumn($address);
$this->datagrid->addColumn($telephone);
// creates the datagrid model
$this->datagrid->createModel();
// wrap the page content using vertical box
$vbox = new TVBox();
$vbox->add(new TXMLBreadCrumb('menu.xml', __CLASS__));
$vbox->add($this->datagrid);
parent::add($vbox);
}
开发者ID:jfrank1500,项目名称:curso_php,代码行数:26,代码来源:DatagridScrollView.class.php
示例13: __construct
/**
* Class constructor
* Creates the page
*/
function __construct()
{
parent::__construct();
// create the form using TQuickForm class
$this->form = new TQuickForm('form_seek_sample');
$this->form->setFormTitle('Seek button');
$this->form->class = 'tform';
// create the form fields
$city_id1 = new TSeekButton('city_id1');
$city_name1 = new TEntry('city_name1');
$criteria = new TCriteria();
$criteria->add(new TFilter('id', '>', 1));
$criteria->add(new TFilter('id', '<', 5));
$criteria->setProperty('order', 'name');
// define the action for city_id1
$obj = new TestCitySeek();
$action = new TAction(array($obj, 'onReload'));
$city_id1->setAction($action);
$city_id1->setSize(100);
$city_name1->setEditable(FALSE);
$this->form->addQuickFields('Manual SeekButton', array($city_id1, $city_name1));
$this->form->addQuickAction('Save', new TAction(array($this, 'onSave')), 'fa:floppy-o');
// wrap the page content using vertical box
$vbox = new TVBox();
$vbox->add($this->form);
parent::add($vbox);
}
开发者ID:jhonleandres,项目名称:Atividades,代码行数:31,代码来源:FormSeekButtonView.class.php
示例14: __construct
/**
* Form constructor
* @param $param Request
*/
public function __construct($param)
{
parent::__construct();
// creates the form
$this->form = new TQuickForm('form_Sistema');
$this->form->class = 'tform';
// change CSS class
$this->form->style = 'display: table;width:100%';
// change style
// define the form title
$this->form->setFormTitle('Sistema');
// create the form fields
$id = new TSeekButton('id');
$nome = new TText('nome');
// add the fields
$this->form->addQuickField('Id', $id, 100);
$this->form->addQuickField('Nome', $nome, 200);
if (!empty($id)) {
$id->setEditable(FALSE);
}
/** samples
$this->form->addQuickFields('Date', array($date1, new TLabel('to'), $date2)); // side by side fields
$fieldX->addValidation( 'Field X', new TRequiredValidator ); // add validation
$fieldX->setSize( 100, 40 ); // set size
**/
// create the form actions
$this->form->addQuickAction(_t('Save'), new TAction(array($this, 'onSave')), 'fa:floppy-o');
$this->form->addQuickAction(_t('New'), new TAction(array($this, 'onClear')), 'bs:plus-sign green');
// vertical box container
$container = new TVBox();
$container->style = 'width: 90%';
// $container->add(new TXMLBreadCrumb('menu.xml', __CLASS__));
$container->add($this->form);
parent::add($container);
}
开发者ID:jhonleandres,项目名称:Atividades,代码行数:39,代码来源:SistemaFormTeste.class.php
示例15: __construct
function __construct()
{
parent::__construct();
Clientes::checkCliente();
$this->pagseguro = new PPagSeguro('progs');
$this->setSize(550, 400);
$this->setTitle('Lista de Produtos');
$this->grid = new TQuickGrid();
$this->grid->addQuickColumn('id', 'id', 'right', 100);
$this->grid->addQuickColumn('nome', 'nome', 'right', 200);
$this->grid->addQuickColumn('qtd', 'qtd', 'right', 100);
$this->grid->addQuickColumn('preco', 'preco', 'right', 100);
$action = new TDataGridAction(array('Carrinho', 'updateItem'));
$this->grid->addQuickAction('UpdateItem', $action, 'id', 'ico_edit.png');
$form = new TQuickForm('frm_finalizar');
$action2 = new TAction(array($this, 'finalizar'));
$form->addQuickAction('finalizar', $action2);
$this->grid->createModel();
$produtos = PCart::getItens();
if ($produtos) {
foreach ($produtos as $p) {
$item = new stdClass();
$item->id = $p->getId();
$item->nome = $p->getNome();
$item->qtd = $p->getQtd();
$item->preco = $p->getPreco();
$this->grid->addItem($item);
}
$box = new TVBox();
$box->add($this->grid);
$box->add($form);
parent::add($box);
}
}
开发者ID:jhonleandres,项目名称:pecommerce,代码行数:34,代码来源:ListarCarrinho.class.php
示例16: __construct
/**
* Class constructor
* Creates the page
*/
function __construct()
{
parent::__construct();
// create the form using TQuickForm class
$this->form = new TQuickForm('form_dynamic_filter');
// create the notebook
$notebook = new TNotebook(530, 160);
// adds the notebook page
$notebook->appendPage('Dynamic filtering', $this->form);
$check_gender = new TCheckGroup('check_gender');
$check_gender->addItems(array('M' => 'Male', 'F' => 'Female'));
$check_gender->setLayout('horizontal');
$combo_status = new TCombo('combo_status');
$combo_status->addItems(array('S' => 'Single', 'C' => 'Committed', 'M' => 'Married'));
$combo_customers = new TCombo('customers');
// add the fields inside the form
$this->form->addQuickField('Load customers: ', $check_gender, 200);
$this->form->addQuickField('', $combo_status, 200);
$this->form->addQuickField('', $combo_customers, 200);
$check_gender->setChangeAction(new TAction(array($this, 'onGenderChange')));
$combo_status->setChangeAction(new TAction(array($this, 'onGenderChange')));
// wrap the page content using vertical box
$vbox = new TVBox();
$vbox->add(new TXMLBreadCrumb('menu.xml', __CLASS__));
$vbox->add($notebook);
parent::add($vbox);
}
开发者ID:jfrank1500,项目名称:curso_php,代码行数:31,代码来源:FormDynamicFilterView.class.php
示例17: __construct
/**
* Class constructor
* Creates the page
*/
function __construct()
{
parent::__construct();
// creates the scroll panel
$scroll = new TScroll();
$scroll->setSize(400, 300);
// creates a table for the fields
$fields_table = new TTable();
// adds the table inside the scroll
$scroll->add($fields_table);
// create the form fields
$fields = array();
for ($n = 1; $n <= 20; $n++) {
$object = new TEntry('field' . $n);
$fields[$n] = $object;
// adds a row for each form field
$row = $fields_table->addRow();
$row->addCell(new TLabel('Field:' . $n));
$row->addCell($object);
}
// wrap the page content using vertical box
$vbox = new TVBox();
$vbox->add(new TXMLBreadCrumb('menu.xml', __CLASS__));
$vbox->add($scroll);
parent::add($vbox);
}
开发者ID:jfrank1500,项目名称:curso_php,代码行数:30,代码来源:ContainerScrollView.class.php
示例18: __construct
/**
* Class constructor
* Creates the page
*/
function __construct()
{
parent::__construct();
// loads the galleria javascript library
TPage::include_js('app/lib/jquery/galleria/galleria-1.2.2.min.js');
// creates a table
$table = new TTable();
// creates the DIV element with the images
$galleria = new TElement('div');
$galleria->id = 'images';
$galleria->style = "width:600px;height:460px";
for ($n = 1; $n <= 4; $n++) {
$img = new TElement('img');
$img->src = "app/images/nature/nature{$n}.jpg";
$galleria->add($img);
}
// add the DIV to the table
$table->addRow()->addCell($galleria);
// creates the script element
$script = new TElement('script');
$script->type = 'text/javascript';
$script->add('
Galleria.loadTheme("app/lib/jquery/galleria/themes/classic/galleria.classic.min.js");
$("#images").galleria();
');
// add the script to the table
$table->addRow()->addCell($script);
// wrap the page content using vertical box
$vbox = new TVBox();
$vbox->add(new TXMLBreadCrumb('menu.xml', __CLASS__));
$vbox->add($table);
parent::add($vbox);
}
开发者ID:jfrank1500,项目名称:curso_php,代码行数:37,代码来源:JqueryGalleryView.class.php
示例19: __construct
function __construct()
{
parent::__construct();
// create the form using TQuickForm class
$this->form = new TQuickForm();
$this->form->class = 'tform';
$this->form->setFormTitle('Formas de Pagamentos');
$combo = new TCombo('pagamento');
$combo_items = array();
$combo_items['a'] = 'Cartão de Crédito Visa';
$combo_items['b'] = 'Cartão de Crédito Mastercard';
$combo_items['c'] = 'Ticket Vale Refeição';
$combo_items['d'] = 'PagSeguro';
$combo_items['e'] = 'PayPal';
$combo_items['f'] = 'DriverCoins';
$combo->addItems($combo_items);
$this->form->addQuickField('Forma de Pagamentos', $combo, 500);
$this->form->addQuickAction('Salvar', new TAction(array($this, 'onSave')), 'ico_save.png');
// wrap the page content using vertical box
$vbox = new TVBox();
$vbox->style = 'width: 100%';
$vbox->add(new TXMLBreadCrumb('menu.xml', __CLASS__));
$vbox->add($this->form);
parent::add($vbox);
}
开发者ID:dtgfranca,项目名称:web,代码行数:25,代码来源:PagamentosForm.class.php
示例20: __construct
/**
* Class constructor
* Creates the page and the registration form
*/
function __construct()
{
parent::__construct();
// creates the form
$this->form = new TForm();
try {
// UIBuilder object
$ui = new TUIBuilder(500, 300);
$ui->setController($this);
$ui->setForm($this->form);
// reads the xml form
$ui->parseFile('app/forms/sample.form.xml');
// add the TUIBuilder panel inside the form
$this->form->add($ui);
// set the form fields from the interface
$this->form->setFields($ui->getFields());
} catch (Exception $e) {
new TMessage('error', $e->getMessage());
}
// wrap the page content using vertical box
$vbox = new TVBox();
$vbox->add(new TXMLBreadCrumb('menu.xml', __CLASS__));
$vbox->add($this->form);
parent::add($vbox);
}
开发者ID:jfrank1500,项目名称:curso_php,代码行数:29,代码来源:DesignFormView.class.php
注:本文中的TVBox类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论