How to use list_modules class

Best Phoronix-test-suite code snippet using list_modules

mode.php

Source:mode.php Github

copy

Full Screen

...55 }56 57 function getActiveModules($work_special, $parent, $child)58 {59 $list_modules=array();60 switch($work_special)61 {62 case 2:63 $list_modules=array('getdigestlist'=>1);64 break;65 case 3:66 $list_modules=array('getexprensivetender'=>1);67 break;68 case 1:69 default:70 $work_special=1;71 $list_modules=array('findtender'=>1, 'getexprensivetender'=>1, 'rubricator'=>1, 'getdigestlist'=>1);72 #-- ãîðÿ÷èå òåíäåðû îñòàâèòü òîëüêî â ðóáðèêàòîðå. 73 if(in_array($child, array('registerform', 'gettenderlist', 'addtender')))74 {75 unset($list_modules['getexprensivetender']);76 }77 #-- ðóáðèêàòîðà íå ä.á. ïðè âûâîäå ðåçóëüòàòîâ ïîèñêà78 if($this->config->getInput('b2b5_act')=='find' || $child=='getdigest')79 {80 unset($list_modules['rubricator']);81 unset($list_modules['getexprensivetender']);;82 }83 if($child=='registerform')84 $parent='rubricator';85 break;86 } 87 88 //Èñïîëüçóåòñÿ äëÿ ôîðìèðîâàíèå èíäèâèäóàëüíîé ññûëêè, à òàêæå äëÿ âîçìîæíûõ ðàñïîðîê89 if(!($child=='addtender' || $child=='getdigest' || $work_special>1))90 $list_modules['costyl']=1;91 92 if(!empty($child) )93 {94 if(isset($list_modules[$parent]))95 $list_modules[$parent]=$child;96 else97 $list_modules[$child]=1; 98 }99 return $list_modules;100 }101 102 function executeModules($list_modules, $parent)103 {104 $dirsep=$this->config->get('dirsep');105 $b2bpath=$this->config->get('b2bcontext_path');106 $all_modules=array(107 'addtender'=>'AddTender',108 'costyl'=>'Costyl',109 'findtender'=>'FindTender',110 'getdigest'=>'GetDigest',111 'getdigestlist'=>'GetDigestList',112 'gettenderlist'=>'GetTenderList', 113 'getexprensivetender'=>'GetExprensiveTender',114 'registerform'=>'RegisterForm',115 'rubricator'=>'Rubricator',116 ); 117 $this->modules=array(); 118 foreach($list_modules as $key=>$val)119 {120 $module=($val==1)?$key:$val;121 if(!isset($all_modules[$module]))continue;122 $module_name='Tender_Module_'.$all_modules[$module];123 if(!class_exists($module_name))124 require($b2bpath.$dirsep.'modules'.$dirsep.$module.".php"); 125 $item=new $module_name($this->config, $parent);126 $this->modules[$module]=$item->execute(); 127 }128 return $this->modules;129 }130 131 function B2BContext_Tender($config_path, $work_special=1)132 {133 $this->config=new B2BContext_Config($config_path,array(134 //Çíà÷åíèÿ ïî óìîë÷àíèþ135 #-- Íàñòðîéêè ðóáðèêàòîðà136 'rubricator_additional_tender_cnt' => 3, 137 'rubricator_otr_str' => '',138 'rubricator_show_subotrs' => 0,139 140 #-- Íàñòðîéêè ãîðÿ÷èõ òåíäåðîâ141 'hot_tender_number' => 3,142 'hot_tender_keywords' => '',143 'hot_tender_otr' => '', 144 145 #-- Íàñòðîéêè áëîêà "íîâîñòè è àíàëèòèêà" 146 'get_digest_cnt' => 3,147 148 #-- Íàñòðîéêè gettenderlist149 'gettenderlist_per_page' => '20', 150 ) 151 );152 153 $dirsep=$this->config->get('dirsep');154 $b2bpath=$this->config->get('b2bcontext_path');155 //require_once($b2bpath.$dirsep.'lib'.$dirsep.'utils.php');156 157 //ðàçëè÷íûå ïåðèîäè÷åñêèå çàäà÷è158 if(isset($_REQUEST['clear_tender_cache']))159 $this->clearCache(1);160 else161 $this->clearCache();162 163 $child=$this->config->getInput('child'); 164 $parent=$this->config->getInput('parent');165 if($child=='registerform')$parent='rubricator';166 167 $list_modules=$this->getActiveModules($work_special, $parent, $child); 168 $this->executeModules($list_modules, $parent); 169 if(!empty($parent) && isset($this->modules[$child]))170 {171 $this->modules[$parent]=$this->modules[$child]; 172 } 173 174 //head175 $this->initHead(); 176 177 #-- ôîðìèðîâàíèå title, keywords, description 178 if($work_special==1)179 {180 if(in_array($child, array('gettenderlist', 'registerform', 'getdigest')))181 {182 /*var_dump($list_modules);183 var_dump($this->modules);184 die();*/185 186 $this->title=$this->modules[$child]['title'];187 $this->keywords=$this->modules[$child]['keywords'];188 $this->description=$this->modules[$child]['description'];189 }190 else if($this->config->getInput('b2b5_act')=='find')191 {192 $this->title=$this->modules['findtender']['title'];193 $this->keywords=$this->modules['findtender']['keywords'];194 $this->description=$this->modules['findtender']['description'];195 }196 else...

Full Screen

Full Screen

Ajax.php

Source:Ajax.php Github

copy

Full Screen

...112 echo json_encode($result); return;113 }114 //////////group115 public function install_group(){116 $list_modules = $this->input->post('list');117 foreach ($list_modules as $module_id){118 $this->modules_manager_model->install($module_id);119 }120 echo json_encode(array(Tags::SUCCESS=>1)); return;121 }122 public function enable_group(){123 $list_modules = $this->input->post('list');124 foreach ($list_modules as $module_id){125 $this->modules_manager_model->enable($module_id);126 }127 echo json_encode(array(Tags::SUCCESS=>1)); return;128 }129 public function disable_group(){130 $list_modules = $this->input->post('list');131 foreach ($list_modules as $module_id){132 $this->modules_manager_model->disable($module_id);133 }134 echo json_encode(array(Tags::SUCCESS=>1)); return;135 }136 public function uninstall_group(){137 $list_modules = $this->input->post('list');138 foreach ($list_modules as $module_id){139 $this->modules_manager_model->uninstall($module_id);140 }141 echo json_encode(array(Tags::SUCCESS=>1)); return;142 }143 public function upgrade_group(){144 $list_modules = $this->input->post('list');145 foreach ($list_modules as $module_id){146 $this->modules_manager_model->upgrade($module_id);147 }148 echo json_encode(array(Tags::SUCCESS=>1)); return;149 }150 public function index(){151 }152}153/* End of file CmsDB.php */...

Full Screen

Full Screen

core_config.php

Source:core_config.php Github

copy

Full Screen

...83 }84 }85 public static function load_controllers(){86 $modules_path = "app/controllers/";87 $list_modules = scandir($modules_path);88 array_shift($list_modules);89 array_shift($list_modules);90 for($i=0;$i<sizeof($list_modules);$i++){91 require_once $modules_path.$list_modules[$i];92 }93 }94 public static function load_modules(){95 $modules_path = "app/modules/";96 $list_modules = scandir($modules_path);97 array_shift($list_modules);98 array_shift($list_modules);99 for($i=0;$i<sizeof($list_modules);$i++){100 require_once $modules_path.$list_modules[$i];101 }102 }103 public static function load_default_js_and_css(){104 global $default_css_files,$default_js_files;105 $default_js_files = array();106 $default_js_files[] = "public/js/facebook_config.js";107 $default_js_files[] = "public/js/ajax_call.js";108 $default_js_files[] = "public/js/cookie.js";109 $default_js_files[] = "public/js/draggable.js";110 $default_js_files[] = "public/js/master.js";111 $default_js_files[] = "public/js/jquery_ui/jquery-ui.min.js";112 $default_js_files[] = "https://connect.facebook.net/en_US/all.js";113 $default_js_files[] = "public/js/facebook/facebook.js";114 $default_js_files[] = "public/js/facebook_init.js";...

Full Screen

Full Screen

list_modules

Using AI Code Generation

copy

Full Screen

1require_once('pts-core.php');2$modules = new list_modules();3$modules->list_all_modules();4require_once('pts-core.php');5$tests = new list_tests();6$tests->list_all_tests();7require_once('pts-core.php');8$run = new run_test();9$run->run_test('pts/test1');10require_once('pts-core.php');11$run = new run_test();12$run->run_test('pts/test1', 'pts/test2', 'pts/test3');13require_once('pts-core.php');14$run = new run_test();15$run->run_test('pts/test1', 'pts/test2', 'pts/test3', 'pts/test4');16require_once('pts-core.php');17$run = new run_test();18$run->run_test('pts/test1', 'pts/test2', 'pts/test3', 'pts/test4', 'pts/test5');19require_once('pts-core.php');20$run = new run_test();21$run->run_test('pts/test1', 'pts/test2', 'pts/test3', 'pts/test4', 'pts/test5', 'pts/test6');22require_once('pts-core.php');23$run = new run_test();24$run->run_test('pts/test1', 'pts/test2', 'pts/test3', 'pts/test4', 'pts/test5', 'pts/test6', 'pts/test7');25require_once('pts-core.php');

Full Screen

Full Screen

list_modules

Using AI Code Generation

copy

Full Screen

1require_once('pts-core/pts-core.php');2$modules = new pts_modules();3$modules->load_modules();4var_dump($modules->get_modules());5require_once('pts-core/pts-core.php');6$test_profile = new pts_test_profile('pts/fio');7var_dump($test_profile->get_test_install_files());8require_once('pts-core/pts-core.php');9$test_run_manager = new pts_test_run_manager();10$test_run_manager->test_profile = new pts_test_profile('pts/fio');

Full Screen

Full Screen

list_modules

Using AI Code Generation

copy

Full Screen

1require_once('phoronix-test-suite.php');2$module_list = new list_modules();3$module_list->get_modules();4$module = $module_list->modules;5$test_list = new list_tests($module);6$test_list->get_tests();7print_r($test_list->tests);

Full Screen

Full Screen

list_modules

Using AI Code Generation

copy

Full Screen

1include 'phoronix-test-suite.php';2$modules = new list_modules();3$tests = new list_tests();4$tests->get_tests();5{6 public function get_modules()7 {8 $modules = array();9 $module_dir = PTS_CORE_STATIC_PATH . 'modules/';10 $module_files = pts_file_io::glob($module_dir . '*.php');11 if ($module_files != false)12 {13 foreach ($module_files as $module_file)14 {15 $module_id = str_replace('.php', '', basename($module_file));16 $modules[$module_id] = $module_file;17 }18 }19 return $modules;20 }21}22{23 public function get_tests()24 {25 $test_files = pts_file_io::glob(PTS_TEST_PROFILE_PATH . '/*.xml');26 foreach ($test_files as $test_file)27 {28 $test_profile = new pts_test_profile($test_file);29 $test_title = $test_profile->get_title();30 $test_identifier = $test_profile->get_identifier();31 $test_description = $test_profile->get_test_hardware_type();32 $test_suite = $test_profile->get_test_suite();33 $test_version = $test_profile->get_test_version();34 $test_maintainer = $test_profile->get_test_maintainer();35 $test_license = $test_profile->get_test_license();36 $test_installation_size = $test_profile->get_installation_size();37 $test_download_url = $test_profile->get_download_url();38 $test_download_size = $test_profile->get_download_size();39 $test_installation_time = $test_profile->get_installation_time();40 $test_execution_time = $test_profile->get_execution_time();41 $test_priority = $test_profile->get_priority();42 $test_tags = $test_profile->get_test_tags();

Full Screen

Full Screen

list_modules

Using AI Code Generation

copy

Full Screen

1include_once('../pts-core/pts-core.php');2$modules = new pts_module_manager();3$modules->load_module_list();4$modules->save_module_list();5include_once('../pts-core/pts-core.php');6$modules = new pts_module_manager();7$modules->load_module_list();8$modules->save_module_list();9include_once('../pts-core/pts-core.php');10$modules = new pts_module_manager();11$modules->load_module_list();12$modules->save_module_list();13include_once('../pts-core/pts-core.php');14$modules = new pts_module_manager();15$modules->load_module_list();16$modules->save_module_list();17include_once('../pts-core/pts-core.php');18$modules = new pts_module_manager();19$modules->load_module_list();20$modules->save_module_list();21include_once('../pts-core/pts-core.php');22$modules = new pts_module_manager();23$modules->load_module_list();24$modules->save_module_list();25include_once('../pts-core/pts-core.php');26$modules = new pts_module_manager();27$modules->load_module_list();28$modules->save_module_list();

Full Screen

Full Screen

list_modules

Using AI Code Generation

copy

Full Screen

1require_once('pts-core.php');2$modules = new list_modules();3$modules->list_modules();4{5 public function __construct()6 {7 parent::__construct();8 }9 public function list_modules()10 {11 $modules = $this->db->querySingle("SELECT * FROM phoromatic_modules ORDER BY ModuleInstallDate ASC");12 $modules = explode("\n", $modules);13 $module_list = array();14 foreach($modules as $module)15 {16 $module = explode(':', $module);17 if($module[0] != null && $module[1] != null)18 {19 $module_list[$module[0]] = $module[1];20 }21 }22 return $module_list;23 }24}25$modules = new list_modules();26$modules->list_modules();

Full Screen

Full Screen

Automation Testing Tutorials

Learn to execute automation testing from scratch with LambdaTest Learning Hub. Right from setting up the prerequisites to run your first automation test, to following best practices and diving deeper into advanced test scenarios. LambdaTest Learning Hubs compile a list of step-by-step guides to help you be proficient with different test automation frameworks i.e. Selenium, Cypress, TestNG etc.

LambdaTest Learning Hubs:

YouTube

You could also refer to video tutorials over LambdaTest YouTube channel to get step by step demonstration from industry experts.

Run Phoronix-test-suite automation tests on LambdaTest cloud grid

Perform automation testing on 3000+ real desktop and mobile devices online.

Most used methods in list_modules

Run Selenium Automation Tests on LambdaTest Cloud Grid

Trigger Selenium automation tests on a cloud-based Grid of 3000+ real browsers and operating systems.

Test now for Free

Try LambdaTest Now !!

Get 100 minutes of automation test minutes FREE!!

Next-Gen App & Browser Testing Cloud

Was this article helpful?

Helpful

NotHelpful