• Модуль: im
  • Путь к файлу: ~/bitrix/modules/im/lib/V2/Marketplace/Application/Entity.php
  • Класс: BitrixImV2MarketplaceApplicationEntity
  • Вызов: Entity::hydrateOptions
private function hydrateOptions(?array $options): void
{
	if (!$options)
	{
		return;
	}

	if (isset($options['role']))
	{
		$this->options['role'] = mb_strtolower($options['role']);
	}
	if (isset($options['extranet']))
	{
		$this->options['extranet'] = $options['extranet'] === 'Y'? 'Y': 'N';
	}
	if (isset($options['context']))
	{
		$this->options['context'] = $this->getContext($options['context']);
	}
	if (isset($options['width']))
	{
		$this->options['width'] = $options['width'];
	}
	if (isset($options['height']))
	{
		$this->options['height'] = $options['height'];
	}
	if (isset($options['iconName']))
	{
		$this->options['iconName'] = $options['iconName'];
	}
	if ($this->placement === Placement::IM_TEXTAREA	|| $this->placement === Placement::IM_SIDEBAR)
	{
		$this->options['color'] = Color::getColor($options['color']) ?? Color::getColorByNumber($this->id);
	}
}