private function display_modules() { /* @var $gb Utils_GenericBrowser */ $gb = $this->init_module('Utils/GenericBrowser', null, 'moduleslist'); // We need total amount of available modules to set GB paging. // It's returned with each request for modules list // so with first request we use only get_limit to retrieve // 'per_page' (numrows) value, then again get_limit to set proper // total amount value. $total = $this->get_module_variable('modules_total'); $x = $gb->get_limit($total === null ? 500 : $total); // fetch data $ret = Base_EpesiStoreCommon::modules_list($x['offset'], $x['numrows']); if ($total === null) { $x = $gb->get_limit($ret['total']); } $this->set_module_variable('modules_total', $ret['total']); if (!$ret['total']) { print __('Unfortunately there are no modules available for you.'); } else { $gb = $this->GB_module($gb, $ret['modules'], array($this, 'GB_row_additional_actions_store')); $this->display_module($gb); } }