• Модуль: socialnetwork
  • Путь к файлу: ~/bitrix/modules/socialnetwork/classes/general/functions.php
  • Класс: CSocNetAllowed
  • Вызов: CSocNetAllowed::addRestFeatures
static function addRestFeatures()
{
	global $USER;

	if (Loader::includeModule('rest'))
	{
		CSocNetAllowed::addAllowedFeature("marketplace", array(
			"allowed" => array(SONET_ENTITY_GROUP),
			"operations" => array(),
			"minoperation" => array(),
		));

		if (
			!isset($USER)
			|| !is_object($USER)
			|| !($USER instanceof CUser)
		)
		{
			return;
		}

		$placementHandlerList = BitrixRestPlacementTable::getHandlersList('SONET_GROUP_DETAIL_TAB');
		if(is_array($placementHandlerList))
		{
			foreach($placementHandlerList as $placementHandler)
			{
				CSocNetAllowed::addAllowedFeature("placement_".$placementHandler['ID'], array(
					"allowed" => array(SONET_ENTITY_GROUP),
					"operations" => array(),
					"minoperation" => array(),
					"title" => $placementHandler['TITLE']
				));
			}
		}
	}
}