- Модуль: rest
- Путь к файлу: ~/bitrix/modules/rest/classes/general/restentity.php
- Класс: CBitrixRestEntity
- Вызов: CBitrixRestEntity::checkItemPropertyParams
static function checkItemPropertyParams(&$params)
{
if(self::checkParams($params))
{
if(isset($params['PROPERTY']))
{
$params['PROPERTY'] = preg_replace('/[^a-zA-Z0-9_]/i', '', trim(strval($params['PROPERTY'])));
}
if(isset($params['PROPERTY_NEW']))
{
$params['PROPERTY_NEW'] = preg_replace('/[^a-zA-Z0-9_]/i', '', trim(strval($params['PROPERTY_NEW'])));
}
if(isset($params['TYPE']))
{
$params['TYPE'] = ToUpper($params['TYPE']);
if(!in_array($params['TYPE'], array('S', 'N', 'F'/*, 'L'*/)))
{
throw new BitrixMainArgumentException('Wrong entity item property type', "TYPE");
}
}
if(isset($params['SORT']))
{
$params['SORT'] = intval($params['SORT']);
}
return true;
}
else
{
return false;
}
}