MessageSms::loadConfiguration

  1. Bitrix24 API (v. 23.675.0)
  2. sender
  3. MessageSms
  4. loadConfiguration
  • Модуль: sender
  • Путь к файлу: ~/bitrix/modules/sender/lib/integration/messageservice/sms/messagesms.php
  • Класс: Bitrix\Sender\Integration\MessageService\Sms\MessageSms
  • Вызов: MessageSms::loadConfiguration
public function loadConfiguration($id = null)
{
	$this->setConfigurationOptions();
	Entity\Message::create()
		->setCode($this->getCode())
		->loadConfiguration($id, $this->configuration);

	$senderOption = $this->configuration->getOption('SENDER');
	if ($senderOption)
	{
		$senderOption->setView(
			function () use ($senderOption)
			{
				ob_start();
				$GLOBALS['APPLICATION']->includeComponent(
					"bitrix:sender.sms.sender",
					".default",
					array(
						"INPUT_NAME" => "%INPUT_NAME%",
						"SENDER" => $senderOption->getValue()
					)
				);

				return ob_get_clean();
			}
		);
	}

	$textOption = $this->configuration->getOption('MESSAGE_TEXT');
	if ($textOption)
	{
		$textOption->setView(
			function ()
			{
				ob_start();
				$GLOBALS['APPLICATION']->includeComponent(
					"bitrix:sender.sms.text.editor",
					".default",
					array(
						"INPUT_NAME" => "%INPUT_NAME%",
						"VALUE" => "%INPUT_VALUE%",
					)
				);

				return ob_get_clean();
			}
		);
	}
	TimeLimiter::prepareMessageConfigurationView($this->configuration);

	return $this->configuration;
}

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