• Модуль: crm
  • Путь к файлу: ~/bitrix/modules/crm/classes/general/crm_pay_system.php
  • Класс: \CCrmPaySystem
  • Вызов: CCrmPaySystem::getActions
static function getActions()
{
	if (!CModule::IncludeModule('sale'))
		return array();

	if (!empty(self::$arActFiles))
		return self::$arActFiles;

	$io = CBXVirtualIo::GetInstance();

	$handlerList = \Bitrix\Sale\PaySystem\Manager::getHandlerList();
	$handlerMap = CSalePaySystemAction::getOldToNewHandlersMap();

	foreach ($handlerList['USER'] as $handler => $title)
	{
		self::$arActFiles[$io->ExtractNameFromPath($handler)] = array(
			"ID" => $io->ExtractNameFromPath($handler),
			"PATH" => \Bitrix\Sale\PaySystem\Manager::getPathToHandlerFolder($handler),
			"HANDLER" => $handler,
			"TITLE" => $title,
			"NEW_FORMAT" => 'Y'
		);
	}

	foreach ($handlerList['SYSTEM'] as $handler => $title)
	{
		if (!in_array($handler, self::$arCrmCompatibleActs))
			continue;

		$path = array_search($handler, $handlerMap);
		if ($path === false)
			$path = \Bitrix\Sale\PaySystem\Manager::getPathToHandlerFolder($handler);

		self::$arActFiles[$handler] = array(
			"ID" => $handler,
			"PATH" => $path,
			"HANDLER" => $handler,
			"TITLE" => $title,
			"NEW_FORMAT" => 'Y'
		);
	}

	sortByColumn(self::$arActFiles, array("ID" => SORT_ASC));

	return self::$arActFiles;
}