• Модуль: landing
  • Путь к файлу: ~/bitrix/modules/landing/lib/block.php
  • Класс: BitrixLandingBlock
  • Вызов: Block::getSpecialManifest
static function getSpecialManifest(string $type): array
{
	static $style = [];

	if (array_key_exists($type, $style))
	{
		return $style[$type];
	}

	$style[$type] = [];
	$paths = self::getGeneralPaths();

	// read all subdirs ($namespaces) in block dir
	foreach ($paths as $path)
	{
		$path = Manager::getDocRoot() . $path;
		if (($handle = opendir($path)))
		{
			while ((($entry = readdir($handle)) !== false))
			{
				if (
					$entry != '.' && $entry != '..' &&
					is_dir($path . '/' . $entry) &&
					file_exists($path . '/' . $entry . '/.' . $type . '.php')
				)
				{
					$style[$type][$entry] = include $path . '/' . $entry . '/.' . $type . '.php';
					if (!is_array($style[$type][$entry]))
					{
						unset($style[$type][$entry]);
					}
				}
			}
		}
	}

	return $style[$type];
}