ReorderFields
class ReorderFields (View source)
Reorder the field labels based on the user-selected fields to display.
Methods
Given a simple list of user-supplied field keys or field labels, return a reordered version of the field labels matching the user selection.
No description
No description
No description
Convert the provided string into a regex suitable for use in preg_match.
Checks whether the string is a regex. This function is copied from MultiplePcreFilterIterator in the Symfony Finder component.
Details
array
reorder(string|array $fields, array $fieldLabels, array $data)
Given a simple list of user-supplied field keys or field labels, return a reordered version of the field labels matching the user selection.
protected
reorderFieldLabels($fields, $fieldLabels, $data)
No description
protected
getSelectedFieldKeys($fields, $fieldLabels)
No description
protected
matchFieldInLabelMap($field, $fieldLabels)
No description
protected
convertToRegex($str)
Convert the provided string into a regex suitable for use in preg_match.
Matching occurs in the same way as the Symfony Finder component: http://symfony.com/doc/current/components/finder.html#file-name
protected bool
isRegex(string $str)
Checks whether the string is a regex. This function is copied from MultiplePcreFilterIterator in the Symfony Finder component.