public static function GetActions() { if (empty(self::$actions_cache)) { $arActions = array(); foreach (self::GetActionsInfo() as $action) { $result = ExecuteModuleEvent($action); $arActions[$result['id']] = $result; } self::$actions_cache = $arActions; } return self::$actions_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"] . BX_ROOT . "/modules/main/prolog.php"; require_once $_SERVER["DOCUMENT_ROOT"] . "/bitrix/modules/main/include/prolog_admin_js.php"; if (!CModule::IncludeModule('iblock')) { die('no iblock module'); } if (!CModule::IncludeModule('ibulkapi')) { die('no ibulkapi module'); } IncludeModuleLangFile(__FILE__); $action_instance = CIBulkAPI::GetActionInstance($_GET['id']); $result = $action_instance->Process($_GET); print json_encode($result);
<?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'); } 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 {