• Модуль: messageservice
  • Путь к файлу: ~/bitrix/modules/messageservice/lib/sender/base.php
  • Класс: BitrixMessageServiceSenderBase
  • Вызов: Base::getShortName
public function getShortName();

/**
 * Check can use state of provider.
 * @return bool
 */
abstract public function canUse();

abstract public function getFromList();

/**
 * Get default From.
 * @return null|string
 */
public function getDefaultFrom()
{
	$fromList = $this->getFromList();
	$from = isset($fromList[0]) ? $fromList[0]['id'] : null;
	//Try to find alphanumeric from
	foreach ($fromList as $item)
	{
		if (!preg_match('#^[0-9]+$#', $item['id']))
		{
			$from = $item['id'];
			break;
		}
	}
	return $from;
}