• Модуль: im
  • Путь к файлу: ~/bitrix/modules/im/lib/V2/Message/Param.php
  • Класс: BitrixImV2MessageParam
  • Вызов: Param::getDefaultValue
public function getDefaultValue()
{
	if ($this->defaultValue === null)
	{
		$type = Params::getType($this->name);
		if (isset($type['default']))
		{
			$value = $type['default'];

			switch ($this->type)
			{
				case self::TYPE_INT:
					$this->defaultValue = (int)$value;
					break;

				case self::TYPE_BOOL:
					$this->defaultValue = (bool)$value;
					break;

				case self::TYPE_STRING:
					$this->defaultValue = (string)$value;
					break;

				default:
					$this->defaultValue = $value;
			}
		}
	}

	return $this->defaultValue;
}