Example #1
0
 function display($tpl = null)
 {
     $app = JFactory::getApplication();
     $model = new EstivoleModelServices();
     $this->services = $model->listItems(true);
     //display
     return parent::display($tpl);
 }
Example #2
0
 function servicesList()
 {
     $serviceModel = new EstivoleModelServices();
     $this->services = $serviceModel->listItems();
     ## Initialize array to store dropdown options ##
     $options = array();
     foreach ($this->services as $service) {
         ## Create $value ##
         $options[] = JHTML::_('select.option', $service->service_id, $service->service_name);
     }
     ## Create <select name="month" class="inputbox"></select> ##
     return JHTML::_('select.genericlist', $options, 'jform[service_id]', 'class="inputbox" id="service_id"', 'value', 'text', $default);
 }
Example #3
0
 function display($tpl = null)
 {
     $app = JFactory::getApplication();
     $this->state = $this->get('State');
     $this->pagination = $this->get('Pagination');
     $model = new EstivoleModelServices();
     $layout = $app->input->get('layout', 'edit');
     switch ($layout) {
         case "edit":
             $this->service = $model->getItem();
         default:
             $this->services = $model->listItems();
             break;
     }
     EstivoleHelpersEstivole::addSubmenu('services');
     $this->sidebar = JHtmlSidebar::render();
     $this->addToolbar();
     //display
     return parent::display($tpl);
 }