- Модуль: intranet
- Путь к файлу: ~/bitrix/modules/intranet/lib/integration/templates/bitrix24/themepicker.php
- Класс: BitrixIntranetIntegrationTemplatesBitrix24ThemePicker
- Вызов: ThemePicker::setLastUsage
private function setLastUsage($themeId, $autoPrepend = true)
{
/** @var array $themesUsage */
$themesUsage = CUserOptions::getOption(
"intranet",
$this->getLastThemesOptionName(),
[],
$this->getUserId()
);
foreach ($themesUsage as $index => $id)
{
if ($themeId === $id)
{
array_splice($themesUsage, $index, 1);
break;
}
}
if ($autoPrepend)
{
array_unshift($themesUsage, $themeId);
}
CUserOptions::setOption("intranet", $this->getLastThemesOptionName(), $themesUsage, false, $this->getUserId());
}