• Модуль: intranet
  • Путь к файлу: ~/bitrix/modules/intranet/lib/integration/templates/bitrix24/themepicker.php
  • Класс: BitrixIntranetIntegrationTemplatesBitrix24ThemePicker
  • Вызов: ThemePicker::getCustomThemes
public function getCustomThemes()
{
	$themes = array();

	/** @var array $customThemes */
	$customThemes = $this->getCustomThemesOptions();

	$defaultTheme = $this->getDefaultTheme();
	$defaultThemeId = $this->getDefaultThemeId();
	$defaultFound = false;

	foreach (array_keys($customThemes) as $index => $themeId)
	{
		$theme = $this->getCustomTheme($themeId);
		if ($theme !== null)
		{
			$theme["sort"] = $index + 100;
			$theme["default"] = false;

			if ($defaultThemeId === $themeId)
			{
				$theme["default"] = true;
				$defaultFound = true;
			}

			$themes[] = $theme;
		}
	}

	if (!$defaultFound && $defaultTheme && $this->isCustomThemeId($defaultThemeId))
	{
		$defaultTheme["sort"] = 100;
		$defaultTheme["default"] = true;
		$defaultTheme["removable"] = false;
		$themes[] = $defaultTheme;
	}

	return $themes;
}