コード例 #1
0
 public function enable()
 {
     $language = new Language($this->config);
     $language->loadLanguageFile('administrator/exchange_rates.php', DS . 'modules' . DS . 'exchange_rates');
     $layout_strings = $language->getFile('administrator/layout.php');
     $layout_strings['module_exchange_rates'] = $language->get('module_exchange_rates');
     $language->updateFile('administrator/layout.php', $layout_strings);
     $main_menu = new Menu($this->config, $language);
     $main_menu->loadMenu('menu_admin_main.php');
     $main_menu->insert_menu(['content', 'file_manager'], 'exchange_rates', ['controller' => 'administrator/ExchangeRates', 'method' => 'index', 'text_tag' => 'module_exchange_rates']);
     $main_menu->update();
 }
コード例 #2
0
 public function enable()
 {
     $language = new Language($this->config);
     $language->loadLanguageFile('administrator/location_detect.php', DS . 'modules' . DS . 'location_detect');
     $layout_strings = $language->getFile('administrator/layout.php');
     $layout_strings['users_module_location_detect'] = $language->get('location_detect');
     $language->updateFile('administrator/layout.php', $layout_strings);
     $main_menu = new Menu($this->config, $language);
     $main_menu->loadMenu('menu_admin_main.php');
     $main_menu->insert_menu(['users', 'location_detect'], 'users_location_dectect', ['controller' => 'administrator/LocationDetect', 'method' => 'index', 'text_tag' => 'users_module_location_detect']);
     $main_menu->update();
 }