• Модуль: rest
  • Путь к файлу: ~/bitrix/modules/rest/lib/integration/view/base.php
  • Класс: BitrixRestIntegrationViewBase
  • Вызов: Base::prepareFieldAttributs
protected function prepareFieldAttributs($info, $attributs): array
{
	$intersectRequired = array_intersect([
		Attributes::REQUIRED,
		Attributes::REQUIRED_ADD,
		Attributes::REQUIRED_UPDATE
	], $attributs);

	return array(
		'TYPE' => $info['TYPE'],
		'IS_REQUIRED' => count($intersectRequired) > 0,
		'IS_READ_ONLY' => in_array(Attributes::READONLY, $attributs, true),
		'IS_IMMUTABLE' => in_array(Attributes::IMMUTABLE, $attributs, true)
	);
}