- Модуль: mobile
- Путь к файлу: ~/bitrix/modules/mobile/lib/tab/manager.php
- Класс: BitrixMobileTabManager
- Вызов: Manager::setCustomConfig
public function setCustomConfig(array $config = [])
{
global $CACHE_MANAGER;
if (!is_array($config))
{
return new SystemException("Tab config must be array", 400);
}
$config = array_map(function ($value) {
if ($value >= self::maxSortValue)
{
$value = self::maxSortValue - 1;
}
return (int)$value;
}, $config);
Option::set("mobile", "tabs_{$this->context->userId}", Json::encode($config), $this->context->siteId);//set custom config
Option::set("mobile", "tabs_preset_{$this->context->userId}", "manual", $this->context->siteId);//set reset preset
$this->config["presets"]["manual"] = $config;
$CACHE_MANAGER->ClearByTag('mobile_custom_menu' . $this->context->userId);
return $this->getActiveTabs();
}