RR
Fatal error: Uncaught Error: Call to undefined method Adianti
Pessoal boa tarde fiz a instalação de todos o coponetes para rodar o template mas fica dando erro de "Fatal error: Uncaught Error: Call to undefined method AdiantiControlTPage::setDatabase() in /var/www/html/app/control/aniversariantes/ListNiverGridView.php:17 Stack trace: #0 /var/www/html/lib/adianti/core/AdiantiCoreApplication.php(60): ListNiverGridView->__construct(Array) #1 /var/www/html/engine.php(32): AdiantiCoreAdiantiCoreApplication::run(true) #2 /var/www/html/engine.php(51): TApplication::run(true) #3 {main} thrown in /var/www/html/app/control/aniversariantes/ListNiverGridView.php on line 17"
Não sei o que pode ser de errado alguem pode me dar uma ajuda segue abaixo o codigo:
Não sei o que pode ser de errado alguem pode me dar uma ajuda segue abaixo o codigo:
- <?php
- class ListNiverGridView extends TPage
- {
- protected $form; // registration form
- protected $datagrid; // listing
- protected $pageNavigation;
-
- /**
- * Class constructor
- * Creates the page, the form and the listing
- */
- public function __construct()
- {
- parent::__construct();
-
- parent::setDatabase('samples'); // defines the database
- parent::setActiveRecord('Aniversariantes'); // defines the active record
- parent::addFilterField('nome', 'like', 'nome'); // filter field, operator, form field
- parent::setDefaultOrder('id_aniversariante', 'asc'); // define the default order
-
- // creates the form
- $this->form = new TQuickForm('form_search_Aniversariantes');
- $this->form->setFormTitle('Standard datagrid');
- $this->form->class = 'tform';
-
- $nome = new TEntry('nome');
- $this->form->addQuickField( 'Nome:', $nome, '70%' );
- $this->form->addQuickAction('Procurar', new TAction(array($this, 'onSearch')), 'fa:search blue');
- $this->form->addQuickAction('Novo', new TAction(array('AniversarianteFormView', 'onClear')), 'fa:plus-circle green');
-
- // keep the form filled with the search data
- $this->form->setData( TSession::getValue('Aniversariantes_filter_data') );
-
- // creates the DataGrid
- $this->datagrid = new TQuickGrid;
- $this->datagrid->style = "width: 100%";
-
- // creates the datagrid columns
- $this->datagrid->addQuickColumn('Id', 'id_aniversariante', 'right', '10%', new TAction(array($this, 'onReload')), array('order', 'id_aniversariante'));
- $this->datagrid->addQuickColumn('Nome', 'nome', 'left', '60%', new TAction(array($this, 'onReload')), array('order', 'nome'));
-
- // creates two datagrid actions
- $this->datagrid->addQuickAction('Editar', new TDataGridAction(array('AniversariantesFormView', 'onEdit')), 'id', 'fa:edit blue');
- $this->datagrid->addQuickAction('Deletar', new TDataGridAction(array($this, 'onDelete')), 'id', 'fa:trash red');
-
- // create the datagrid model
- $this->datagrid->createModel();
-
- // creates the page navigation
- $this->pageNavigation = new TPageNavigation;
- $this->pageNavigation->setAction(new TAction(array($this, 'onReload')));
- $this->pageNavigation->setWidth($this->datagrid->getWidth());
-
- // creates the page structure using a table
- $vbox = new TVBox;
- $vbox->add($this->form);
- $vbox->add($this->datagrid);
- $vbox->add($this->pageNavigation);
-
- // add the table inside the page
- parent::add($vbox);
- }
-
- }
class ListNiverGridView extends TStandardList e não TPage