• Модуль: intranet
  • Путь к файлу: ~/bitrix/modules/intranet/lib/UI/LeftMenu/Preset/Social.php
  • Класс: BitrixIntranetUILeftMenuPresetSocial
  • Вызов: Social::getStructure
public function getStructure(): array
{
	static $structure;
	if ($structure)
	{
		return $structure;
	}

	$structure = static::STRUCTURE;
	$found = false;
	$filler = function(&$item, $key) use (&$filler, &$found) {
		if ($key === 'menu_marketplace_group')
		{
			$found = false;
			foreach ($this->getMarketPlaceStructure() as $application)
			{
				$item[] = $application;
			}
		}
		else if (is_array($item) && $found === false)
		{
			array_walk($item, $filler);
		}
	};
	array_walk($structure, $filler);
	return $structure;
}