• Модуль: rest
  • Путь к файлу: ~/bitrix/modules/rest/lib/userfieldproxy.php
  • Класс: BitrixRestUserFieldProxy
  • Вызов: UserFieldProxy::getFields
static function getFields()
{
	if(self::$fieldsInfo === null)
	{
		//isReadOnly - Can not be defined by user. Read only access.
		//isImmutable - Can be defined by user during creation. It can not be changed.
		//isMultiple - It is multiple (array will be returned).

		self::includeLangFile();
		self::$fieldsInfo = array(
			'ID' => array('type' => 'int', 'title' => GetMessage('REST_UF_ID'), 'isReadOnly'=> true),
			'ENTITY_ID' => array('type' => 'string', 'title' => GetMessage('REST_UF_ENTITY_ID'), 'isImmutable' => true),
			'FIELD_NAME' => array('type' => 'string', 'title' => GetMessage('REST_UF_FIELD_NAME'), 'isImmutable' => true),
			'USER_TYPE_ID' => array('type' => 'string', 'title' => GetMessage('REST_UF_USER_TYPE_ID'), 'isImmutable' => true),
			'XML_ID' => array('type' => 'string', 'title' => GetMessage('REST_UF_XML_ID')),
			'SORT' => array('type' => 'int', 'title' => GetMessage('REST_UF_SORT')),
			'MULTIPLE' => array('type' => 'char', 'title' => GetMessage('REST_UF_MULTIPLE')),
			'MANDATORY' => array('type' => 'char', 'title' => GetMessage('REST_UF_MANDATORY')),
			'SHOW_FILTER' => array('type' => 'char', 'title' => GetMessage('REST_UF_SHOW_FILTER')),
			'SHOW_IN_LIST' => array('type' => 'char', 'title' => GetMessage('REST_UF_SHOW_IN_LIST')),
			'EDIT_IN_LIST' => array('type' => 'char', 'title' => GetMessage('REST_UF_EDIT_IN_LIST')),
			'IS_SEARCHABLE' => array('type' => 'char', 'title' => GetMessage('REST_UF_IS_SEARCHABLE')),
			'EDIT_FORM_LABEL' => array('type' => 'string', 'title' => GetMessage('REST_UF_EDIT_FORM_LABEL')),
			'LIST_COLUMN_LABEL' => array('type' => 'string', 'title' => GetMessage('REST_UF_LIST_COLUMN_LABEL')),
			'LIST_FILTER_LABEL' => array('type' => 'string', 'title' => GetMessage('REST_UF_LIST_FILTER_LABEL')),
			'ERROR_MESSAGE' => array('type' => 'string', 'title' => GetMessage('REST_UF_ERROR_MESSAGE')),
			'HELP_MESSAGE' => array('type' => 'string', 'title' => GetMessage('REST_UF_HELP_MESSAGE')),
			'LIST' => array('type' => 'uf_enum_element', 'title' => GetMessage('REST_UF_LIST'), 'isMultiple'=> true),
			'SETTINGS' => array('type' => 'object', 'title' => GetMessage('REST_UF_SETTINGS'))
		);
	}

	return self::$fieldsInfo;
}