{$method}(); } else { $wiz->error('Method not found. ['.$method.']'); } // Stop any execution. exit; } else { $result = $wiz->run(); if (is_array($result) === true) { // Redirect control and messages to DiscoveryTasklist. $classname_selected = 'DiscoveryTaskList'; $wiz = new $classname_selected($page); $result = $wiz->run($result['msg'], $result['result']); } } } if ($classname_selected === null) { // Load classes and print selector. $wiz_data = []; foreach ($classes as $classpath) { $classname = basename($classpath, '.class.php'); $obj = new $classname(); $button = $obj->load(); if ($button === false) { // No acess, skip. continue; } // DiscoveryTaskList must be first button. if ($classname == 'DiscoveryTaskList') { array_unshift($wiz_data, $button); } else { $wiz_data[] = $button; } } // Show hints if there is no task. if (get_parameter('discovery_hint', 0)) { ui_require_css_file('discovery-hint'); ui_print_info_message(__('You must create a task first')); } Wizard::printBigButtonsList($wiz_data); }