- Модуль: rest
- Путь к файлу: ~/bitrix/modules/rest/lib/userfieldproxy.php
- Класс: BitrixRestUserFieldProxy
- Вызов: UserFieldProxy::getSettingsFields
static function getSettingsFields($typeID)
{
if(!is_string($typeID))
{
throw new MainArgumentTypeException('typeID', 'string');
}
if($typeID === '')
{
throw new MainArgumentException('Empty string is specified', 'typeID');
}
self::includeLangFile();
switch($typeID)
{
case 'string':
{
return array(
'DEFAULT_VALUE' => array('type' => 'string', 'title' => GetMessage('REST_UF_DEFAULT_VALUE')),
'ROWS' => array('type' => 'int', 'title' => GetMessage('REST_UF_ROWS'))
);
}
case 'integer':
{
return array(
'DEFAULT_VALUE' => array('type' => 'int', 'title' => GetMessage('REST_UF_DEFAULT_VALUE'))
);
}
case 'double':
{
return array(
'DEFAULT_VALUE' => array('type' => 'double', 'title' => GetMessage('REST_UF_DEFAULT_VALUE')),
'PRECISION' => array('type' => 'int', 'title' => GetMessage('REST_UF_PRECISION'))
);
}
case 'boolean':
{
return array(
'DEFAULT_VALUE' => array('type' => 'int', 'title' => GetMessage('REST_UF_DEFAULT_VALUE')),
'DISPLAY' => array('type' => 'string', 'title' => GetMessage('REST_UF_DISPLAY'))
);
}
case 'datetime':
{
return array(
'DEFAULT_VALUE' => array('type' => 'datetime', 'title' => GetMessage('REST_UF_DEFAULT_VALUE'))
);
}
case 'enumeration':
{
return array(
'DISPLAY' => array('type' => 'string', 'title' => GetMessage('REST_UF_DISPLAY')),
'LIST_HEIGHT' => array('type' => 'int', 'title' => GetMessage('REST_UF_LIST_HEIGHT')),
);
}
case 'iblock_section':
case 'iblock_element':
{
return array(
'DEFAULT_VALUE' => array('type' => 'int', 'title' => GetMessage('REST_UF_DEFAULT_VALUE')),
'IBLOCK_ID' => array('type' => 'int', 'title' => GetMessage('REST_UF_IBLOCK_ID')),
'IBLOCK_TYPE_ID' => array('type' => 'string', 'title' => GetMessage('REST_UF_IBLOCK_TYPE_ID')),
'DISPLAY' => array('type' => 'string', 'title' => GetMessage('REST_UF_DISPLAY')),
'LIST_HEIGHT' => array('type' => 'int', 'title' => GetMessage('REST_UF_LIST_HEIGHT')),
'ACTIVE_FILTER' => array('type' => 'char', 'title' => GetMessage('REST_UF_ACTIVE_FILTER'))
);
}
case 'crm_status':
{
return array(
'ENTITY_TYPE' => array('type' => 'string', 'title' => GetMessage('REST_UF_ENTITY_TYPE'))
);
}
case 'crm':
{
return array(
'LEAD' => array('type' => 'char', 'title' => GetMessage('REST_UF_CRM_LEAD')),
'CONTACT' => array('type' => 'char', 'title' => GetMessage('REST_UF_CRM_CONTACT')),
'COMPANY' => array('type' => 'char', 'title' => GetMessage('REST_UF_CRM_COMPANY')),
'DEAL' => array('type' => 'char', 'title' => GetMessage('REST_UF_CRM_DEAL'))
);
}
default:
{
return array();
}
}
}