PHP Class FluidTYPO3\Vhs\ViewHelpers\Iterator\SortViewHelper

Can be used inline, i.e.: iterating data which is ONLY sorted while rendering this particular loop
Inheritance: extends TYPO3\CMS\Fluid\Core\ViewHelper\AbstractViewHelper, use trait FluidTYPO3\Vhs\Traits\BasicViewHelperTrait, use trait FluidTYPO3\Vhs\Traits\TemplateVariableViewHelperTrait, use trait FluidTYPO3\Vhs\Traits\ArrayConsumingViewHelperTrait
ファイルを表示 Open project: fluidtypo3/vhs

Protected Properties

Property Type Description
$allowedSortFlags array Contains all flags that are allowed to be used with the sorting functions

Public Methods

Method Description
initializeArguments ( ) : void Initialize arguments
render ( ) : mixed "Render" method - sorts a target list-type target. Either $array or $objectStorage must be specified. If both are, ObjectStorage takes precedence.

Protected Methods

Method Description
getSortFlags ( ) : integer Parses the supplied flags into the proper value for the sorting function.
getSortValue ( mixed $object ) : mixed Gets the value to use as sorting value from $object
sortArray ( array | Iterator $array ) : array Sort an array
sortObjectStorage ( TYPO3\CMS\Extbase\Persistence\ObjectStorage $storage ) : TYPO3\CMS\Extbase\Persistence\ObjectStorage Sort an ObjectStorage instance

Method Details

getSortFlags() protected method

Parses the supplied flags into the proper value for the sorting function.
protected getSortFlags ( ) : integer
return integer

getSortValue() protected method

Gets the value to use as sorting value from $object
protected getSortValue ( mixed $object ) : mixed
$object mixed
return mixed

initializeArguments() public method

Initialize arguments
public initializeArguments ( ) : void
return void

render() public method

Returns the same type as $subject. Ignores NULL values which would be OK to use in an f:for (empty loop as result)
public render ( ) : mixed
return mixed

sortArray() protected method

Sort an array
protected sortArray ( array | Iterator $array ) : array
$array array | Iterator
return array

sortObjectStorage() protected method

Sort an ObjectStorage instance
protected sortObjectStorage ( TYPO3\CMS\Extbase\Persistence\ObjectStorage $storage ) : TYPO3\CMS\Extbase\Persistence\ObjectStorage
$storage TYPO3\CMS\Extbase\Persistence\ObjectStorage
return TYPO3\CMS\Extbase\Persistence\ObjectStorage

Property Details

$allowedSortFlags protected_oe property

Contains all flags that are allowed to be used with the sorting functions
protected array $allowedSortFlags
return array