• Модуль: rpa
  • Путь к файлу: ~/bitrix/modules/rpa/lib/model/item.php
  • Класс: BitrixRpaModelItem
  • Вызов: Item::isValueChanged
public function isValueChanged(string $fieldName): bool
{
	$field = $this->entity->getField($fieldName);
	if($field instanceof ArrayField)
	{
		$actualValue = $this->remindActual($fieldName);
		$newValue = $this->get($fieldName);
		if(is_array($newValue))
		{
			$newValue = array_filter($newValue);
		}

		if(!is_array($actualValue) || !is_array($newValue))
		{
			return true;
		}

		return (!empty(array_diff($actualValue, $newValue)) || !empty(array_diff($newValue, $actualValue)));
	}

	return $this->isChanged($fieldName);
}