// Update existing container $container = Container::getById($_REQUEST['container_id']); Tygh::$app['view']->assign('container', $container); } } elseif ($mode == 'update_location') { $location_data = array('dispatch' => ''); if (!empty($_REQUEST['location'])) { $location_data = Location::instance()->getById($_REQUEST['location'], DESCR_SL); } if (isset($_REQUEST['location_data']['dispatch'])) { $location_data['dispatch'] = $_REQUEST['location_data']['dispatch']; $location_data['object_ids'] = ""; } Tygh::$app['view']->assign('location', $location_data); Tygh::$app['view']->assign('dynamic_object_scheme', SchemesManager::getDynamicObject($location_data['dispatch'], 'C')); Tygh::$app['view']->assign('dispatch_descriptions', SchemesManager::getDispatchDescriptions()); if (defined('AJAX_REQUEST')) { Tygh::$app['view']->display('views/block_manager/update_location.tpl'); exit; } } elseif ($mode == 'block_selection') { $selected_location = fn_get_selected_location($_REQUEST); if (!empty($_REQUEST['on_product_tabs'])) { $selected_location['dispatch'] = 'product_tabs'; } $unique_blocks = SchemesManager::filterByLocation(Block::instance()->getAllUnique(DESCR_SL), $selected_location); $block_types = SchemesManager::filterByLocation(SchemesManager::getBlockTypes(DESCR_SL), $selected_location); if (!empty($_REQUEST['grid_id'])) { Tygh::$app['view']->assign('grid_id', $_REQUEST['grid_id']); } if (!empty($_REQUEST['extra_id'])) {
// Update existing container $container = Container::getById($_REQUEST['container_id']); Registry::get('view')->assign('container', $container); } } elseif ($mode == 'update_location') { $location_data = array('dispatch' => ''); if (!empty($_REQUEST['location'])) { $location_data = Location::instance()->getById($_REQUEST['location'], DESCR_SL); } if (isset($_REQUEST['location_data']['dispatch'])) { $location_data['dispatch'] = $_REQUEST['location_data']['dispatch']; $location_data['object_ids'] = ""; } Registry::get('view')->assign('location', $location_data); Registry::get('view')->assign('dynamic_object_scheme', SchemesManager::getDynamicObject($location_data['dispatch'], 'C')); Registry::get('view')->assign('dispatch_descriptions', SchemesManager::getDispatchDescriptions()); if (defined('AJAX_REQUEST')) { Registry::get('view')->display('views/block_manager/update_location.tpl'); exit; } } elseif ($mode == 'block_selection') { $selected_location = fn_get_selected_location($_REQUEST); if (!empty($_REQUEST['on_product_tabs'])) { $selected_location['dispatch'] = 'product_tabs'; } $unique_blocks = SchemesManager::filterByLocation(Block::instance()->getAllUnique(DESCR_SL), $selected_location); $block_types = SchemesManager::filterByLocation(SchemesManager::getBlockTypes(DESCR_SL), $selected_location); if (!empty($_REQUEST['grid_id'])) { Registry::get('view')->assign('grid_id', $_REQUEST['grid_id']); } if (!empty($_REQUEST['extra_id'])) {