public function display() { // get MC key if it exists $scapi = new AddonBoilerplateApi(); $data = $scapi->getApiKey(null, array()); $this->ss->assign('apikey', empty($data['apikey']) ? '' : $data['apikey']); // assign errors passed from controller $this->ss->assign('errors', $this->view_object_map['errors']); $this->ss->assign('step_count', 1); $this->ss->display('modules/AddonBoilerplate/tpls/ce/setup/step1.tpl'); }
public function display() { $scapi = new AddonBoilerplateApi(); $data = $scapi->getSetting(null, array('key' => 'my_config')); $errors = array(); if ($data['success'] !== true) { $errors[] = $data['message']; } $this->ss->assign('errors', $errors); $this->ss->assign('my_config', $data['value']); $this->ss->assign('step_count', 3); $this->ss->display('modules/AddonBoilerplate/tpls/ce/setup/step3.tpl'); }
function action_get_setting() { if (empty($_REQUEST['key'])) { echo 'A key is required.'; exit; } $data = array(); $data['key'] = $_REQUEST['key']; $scapi = new AddonBoilerplateApi(); $response = $scapi->getSetting(null, $data); echo print_r($response, true); exit; }
public function display() { // get schedulers lang file $scheduler_lang = return_module_language('en_us', 'Schedulers'); $this->ss->assign('schedulers_LBL_CRON_INSTRUCTIONS_WINDOWS', !empty($scheduler_lang['LBL_CRON_INSTRUCTIONS_WINDOWS']) ? $scheduler_lang['LBL_CRON_INSTRUCTIONS_WINDOWS'] : 'LBL_CRON_INSTRUCTIONS_WINDOWS'); $this->ss->assign('schedulers_LBL_CRON_WINDOWS_DESC', !empty($scheduler_lang['LBL_CRON_WINDOWS_DESC']) ? $scheduler_lang['LBL_CRON_WINDOWS_DESC'] : 'LBL_CRON_WINDOWS_DESC'); $this->ss->assign('schedulers_LBL_CRON_INSTRUCTIONS_LINUX', !empty($scheduler_lang['LBL_CRON_INSTRUCTIONS_LINUX']) ? $scheduler_lang['LBL_CRON_INSTRUCTIONS_LINUX'] : 'LBL_CRON_INSTRUCTIONS_LINUX'); $this->ss->assign('schedulers_LBL_CRON_LINUX_DESC', !empty($scheduler_lang['LBL_CRON_LINUX_DESC']) ? $scheduler_lang['LBL_CRON_LINUX_DESC'] : 'LBL_CRON_LINUX_DESC'); // get scheduler data $scapi = new AddonBoilerplateApi(); $data = $scapi->isSchedulerSet(null, array()); $this->ss->assign('realpath', $data['realpath']); $this->ss->assign('scheduler_ran', $data['scheduler_ran']); $this->ss->assign('is_windows', $data['is_windows']); $this->ss->assign('step_count', 2); $this->ss->display('modules/AddonBoilerplate/tpls/ce/setup/step2.tpl'); }