setBreadcrum([]); $this->access = 'AW'; $this->task = []; $this->msg = $msg; $this->icon = $icon; $this->class = $class_style; $this->label = $label; $this->page = $page; $this->url = ui_get_full_url( 'index.php?sec=gservers&sec2=godmode/servers/discovery&wiz=custom' ); return $this; } /** * Run wizard manager. * * @return mixed Returns null if wizard is ongoing. Result if done. */ public function run() { global $config; // Load styles. parent::run(); // Load current wiz. sub-styles. ui_require_css_file( 'custom', ENTERPRISE_DIR.'/include/styles/wizards/' ); $mode = get_parameter('mode', null); $extensions = new ExtensionsDiscovery('custom', $mode); if ($mode !== null) { // Load extension if exist. $extensions->run(); return; } // Load classes and print selector. $wiz_data = $extensions->loadExtensions(); $this->prepareBreadcrum( [ [ 'link' => ui_get_full_url( 'index.php?sec=gservers&sec2=godmode/servers/discovery' ), 'label' => __('Discovery'), ], [ 'link' => ui_get_full_url( 'index.php?sec=gservers&sec2=godmode/servers/discovery&wiz=custom' ), 'label' => __('Custom'), 'selected' => true, ], ] ); // Header. ui_print_page_header( __('Custom'), '', false, '', true, '', false, '', GENERIC_SIZE_TEXT, '', $this->printHeader(true) ); Wizard::printBigButtonsList($wiz_data); $not_defined_extensions = $extensions->loadExtensions(true); $output = html_print_div( [ 'class' => 'agent_details_line', 'content' => ui_toggle( Wizard::printBigButtonsList($not_defined_extensions, true), ''.__('Not installed').'', 'not_defined_apps', 'not_defined_apps', false, true, '', '', 'box-flat white_table_graph w100p' ), ], ); echo $output; echo '