• Модуль: im
  • Путь к файлу: ~/bitrix/modules/im/lib/V2/Message/Param/Keyboard.php
  • Класс: BitrixImV2MessageParamKeyboard
  • Вызов: Keyboard::setValue
public function setValue($value): self
{
	if ($value instanceof ImBotKeyboard)
	{
		$this->keyboard = $value;
	}
	elseif (!empty($value))
	{
		$this->keyboard = ImBotKeyboard::getKeyboardByJson($value);
	}

	if (isset($this->keyboard))
	{
		$this->value = $this->keyboard->getArray();
		$this->jsonValue = $this->keyboard->getJson();
	}

	return $this;
}