protected static function GetTemplates() { if (empty(self::$templates_cache)) { $rTemplatesInfo = GetModuleEvents('ibulkapi', 'TemplatesInfo'); $arTemplatesInfo = array(); while (false != ($templates_info = $rTemplatesInfo->GetNext())) { $arTemplatesInfo = array_merge($arTemplatesInfo, ExecuteModuleEvent($templates_info)); } self::$templates_cache = $arTemplatesInfo; } return self::$templates_cache; }
<?php require_once $_SERVER["DOCUMENT_ROOT"] . '/bitrix/modules/main/include/prolog_admin_before.php'; require_once $_SERVER["DOCUMENT_ROOT"] . '/bitrix/modules/ibulkapi/prolog.php'; require_once $_SERVER["DOCUMENT_ROOT"] . '/bitrix/modules/main/include/prolog_admin_after.php'; IncludeModuleLangFile(__FILE__); $APPLICATION->SetTitle(GetMessage('PAGE_TITLE')); $APPLICATION->SetAdditionalCSS('/bitrix/js/ibulkapi/ibulkapi_manager.css'); if (!CModule::IncludeModule('iblock')) { die; } if (!CModule::IncludeModule('ibulkapi')) { die; } $arkActions = CIBulkAPI::GetActions(); $current_action = $arkActions[filter_input(INPUT_GET, 'id', FILTER_SANITIZE_STRING)]; $aTabs = array(array('DIV' => 'tab1', 'TAB' => GetMessage('ACTIONS_SETTINGS_NAME'), 'ICON' => '', 'TITLE' => GetMessage('ACTIONS_SETTINGS_TITLE'))); $tabControl = new CAdminTabControl("tabControl", $aTabs); $tabControl->Begin(); $tabControl->BeginNextTab(); $action_instance = new $current_action['class'](); $form = $action_instance->GetParams(); krumo($form); IBulkAPIRenderEngine::Render('actions-settings', array('form' => $form)); $tabControl->EndTab(); $tabControl->End(); require $_SERVER["DOCUMENT_ROOT"] . '/bitrix/modules/main/include/epilog_admin.php';
<?php require_once $_SERVER["DOCUMENT_ROOT"] . '/bitrix/modules/main/include/prolog_admin_before.php'; require_once $_SERVER["DOCUMENT_ROOT"] . '/bitrix/modules/ibulkapi/prolog.php'; require_once $_SERVER["DOCUMENT_ROOT"] . '/bitrix/modules/main/include/prolog_admin_after.php'; IncludeModuleLangFile(__FILE__); $APPLICATION->SetTitle(GetMessage('PAGE_TITLE')); $APPLICATION->SetAdditionalCSS('/bitrix/js/ibulkapi/ibulkapi_manager.css'); if (!CModule::IncludeModule('iblock')) { die('no iblock module'); } if (!CModule::IncludeModule('ibulkapi')) { die('no ibulkapi module'); } $aTabs = array(array('DIV' => 'tab1', 'TAB' => GetMessage('AVAILABLE_ACTIONS_NAME'), 'ICON' => '', 'TITLE' => GetMessage('AVAILABLE_ACTIONS_TITLE'))); $tabControl = new CAdminTabControl("tabControl", $aTabs); $tabControl->Begin(); $tabControl->BeginNextTab(); $arkActions = CIBulkAPI::GetActions(); IBulkAPIRenderEngine::Render('actions-list-rows', array('actions' => $arkActions, 'title' => GetMessage('AVAILABLE_ACTIONS_HEADING'))); $tabControl->EndTab(); $tabControl->End(); require $_SERVER["DOCUMENT_ROOT"] . '/bitrix/modules/main/include/epilog_admin.php';
<form method="post" action="ibulkapi_manager.php"> <input type="hidden" name="action_id" id="action_id" value="<?php print filter_input(INPUT_GET, 'id', FILTER_SANITIZE_STRING); ?> " /> <input type="hidden" name="form_id" id="form_id" value="ibulkapi_action_settings_form" /> <?php foreach ($form as $key => $element) { ?> <?php $element['#id'] = $key; ?> <?php IBulkAPIRenderEngine::Render('actions-settings-element', array('element' => $element)); } ?> </form>
<?php IBulkAPIRenderEngine::Render('form-' . $element['#type'], array('element' => $element));
require_once $_SERVER["DOCUMENT_ROOT"] . '/bitrix/modules/ibulkapi/prolog.php'; require_once $_SERVER["DOCUMENT_ROOT"] . '/bitrix/modules/main/include/prolog_admin_after.php'; IncludeModuleLangFile(__FILE__); $APPLICATION->SetTitle(GetMessage('PAGE_TITLE')); $APPLICATION->SetAdditionalCSS('/bitrix/js/ibulkapi/ibulkapi_manager.css'); if (!CModule::IncludeModule('iblock')) { die('no iblock module'); } if (!CModule::IncludeModule('ibulkapi')) { die('no ibulkapi module'); } if (isset($_POST['form_id']) and $_POST['form_id'] == 'ibulkapi_action_settings_form') { $action = CIBulkAPI::GetActionById($_POST['action_id']); $action_class = $action['class']; $action_ins = new $action_class(); $data = $action_ins->PreProcess($_POST); $worker = $action_ins->GetWorker(); $processes = array(); foreach ($data as $set) { $pairs = array(); foreach ($set as $key => $value) { $pairs[] = sprintf('%s=%s', $key, $value); } $processes[] = sprintf('%s?id=%s&%s', $worker, $_POST['action_id'], implode('&', $pairs)); } IBulkAPIRenderEngine::Render('action-in-progress', array('processes' => $processes, 'worker_period' => $_POST['worker_period'])); $action_ins->PostProcess($_POST); } else { header('Location: ibulkapi_list.php'); } require $_SERVER["DOCUMENT_ROOT"] . '/bitrix/modules/main/include/epilog_admin.php';