<?php
namespace Modules\Admin\Server\Checks; class View_Utils_FormFilters extends \App\Mvc\View_Utils_FormAbstract { public function getForm() { $fieldsValues = $this->values['listingParams']->getFilters(); $form=\Engine\Form\Filters::create(); $form->setColumns(2); $possibleValues = [ 'EXTENSION' => "EXTENSION", 'PHP' => "PHP", 'OS' => "OS", 'MYSQL' => "MYSQL", ]; $tagFilter = new \Engine\Form\Input\Select($this->lang['index']['filters']['tag'], 'filters[tag]', $fieldsValues['tag']); $tagFilter->showDefaultOption(); $tagFilter->setPossibleValues($possibleValues); $form->addElement($tagFilter); $labelFilter = new \Engine\Form\Input\Text($this->lang['index']['filters']['label'], 'filters[label]', $fieldsValues['label']); $form->addElement($labelFilter); $form->setJsCallback('MVC.listing.installedHandlers["listing"].reloadAndResetListing'); $form->loadMissingDefaultValues($this->values['listingParams']->getDefaultFilters()); return $form; } } 