• Модуль: im
  • Путь к файлу: ~/bitrix/modules/im/lib/V2/Message/ParamArray.php
  • Класс: BitrixImV2MessageParamArray
  • Вызов: ParamArray::unsetValue
public function unsetValue($values = []): self
{
	if (!empty($values))
	{
		if (!is_array($values))
		{
			$values = [$values];
		}
		switch ($this->type)
		{
			case Param::TYPE_INT_ARRAY:
				$values = array_map('intVal', $values);
				break;

			case Param::TYPE_STRING:
				$values = array_map('strval', $values);
		}

		foreach ($this as $param)
		{
			if (in_array($param->getValue(), $values, true))
			{
				$param->markDrop();
			}
		}

		$this->markChanged();
	}
	else
	{
		foreach ($this as $param)
		{
			$param->markDrop();
		}

		if ($this->getRegistry())
		{
			unset($this->getRegistry()[$this->getName()]);
		}

		$this->markDrop();
	}

	return $this;
}