Rights::getAdditionalRightsLabels

  1. Bitrix24 API (v. 23.675.0)
  2. landing
  3. Rights
  4. getAdditionalRightsLabels
  • Модуль: landing
  • Путь к файлу: ~/bitrix/modules/landing/lib/rights.php
  • Класс: BitrixLandingRights
  • Вызов: Rights::getAdditionalRightsLabels
static function getAdditionalRightsLabels()
{
	$rights = [];

	$type = SiteType::getCurrentScopeId();

	foreach (self::ADDITIONAL_RIGHTS as $right)
	{
		if (mb_strpos($right, '_') > 0)
		{
			[$prefix, ] = explode('_', $right);
			$prefix = mb_strtoupper($prefix);
			if ($prefix != $type)
			{
				continue;
			}
		}
		else if ($type !== null)
		{
			continue;
		}
		$rights[$right] = Loc::getMessage('LANDING_RIGHTS_R_'.mb_strtoupper($right));
	}

	return $rights;
}

Добавить комментарий