Пример #1
0
 public function display($tpl = null)
 {
     $this->state = $this->get('State');
     //set customer type for each layout
     $filter_user_type = $this->state->get('filter.group_id');
     if (!$filter_user_type) {
         $this->state->set('filter.group_id', -3);
     }
     $this->items = $this->get('Items');
     $this->pagination = $this->get('Pagination');
     // Check for errors.
     if (count($errors = $this->get('Errors'))) {
         JError::raiseError(500, implode("\n", $errors));
         return false;
     }
     // Include the component HTML helpers.
     JHtml::addIncludePath(JPATH_COMPONENT . '/helpers/html');
     $this->customergroup = AHtml::getCustomerGroupSelect($this->state->get('filter.group_id'));
     $this->addToolbar();
     parent::display($tpl);
 }