Метод prepareTemplatesOrder

protected

Сигнатура метода

protected function prepareTemplatesOrder(array &$order): void

Возвращает: void

Описание

Sanitizes the requested sort order against the entity map. The legacy CBPHelper::PrepareSql() implementation silently ignored any sort field/direction that was not part of the whitelist. The ORM query, on the contrary, throws Main\ArgumentException ("Unknown field definition") for an unknown field and for an invalid direction. Untrusted input (e.g. the grid "by"/"order" URL parameters) must not be able to trigger a fatal, so we drop unknown fields and normalize the direction, restoring the tolerant behavior.

Параметры

1
Имя Тип По умолчанию Флаги
$order array —
by-ref

Расположение

Исходный файл метода в Bitrix Framework

Путь к исходному файлу Source
~/bitrix/modulesbizproc/classes/general/workflowtemplateloader.php
Расположение метода в файле
Строки 1653–1683

Исходный код

PHP