• Модуль: sender
  • Путь к файлу: ~/bitrix/modules/sender/lib/integration/voximplant/audio.php
  • Класс: Bitrix\Sender\Integration\VoxImplant\Audio
  • Вызов: Audio::getDbValue
public function getDbValue()
{
	if (!$this->getFileId() && !$this->getPreset())
	{
		return false;
	}
	$result = [
		'type' => $this->createdFromPreset() ? self::AUDIO_TYPE_PRESET : self::AUDIO_TYPE_FILE,
		'duration' => $this->getDuration()
	];
	if ($this->createdFromPreset())
	{
		$result['preset'] = $this->getPreset();
	}
	else
	{
		$result['fileId'] = $this->getFileId();
	}
	return Json::encode($result);
}