All Classes Namespaces Files Functions Variables Pages
CategoryMenuUtility Class Reference

Public Member Functions

 collectPages ($selectedCategories, $configuration, $parentObject)

Static Public Member Functions

static sortPagesUtility ($pageA, $pageB)

Protected Member Functions

 sortPages ($pages, $order)

Static Protected Attributes

static $sortingField

Detailed Description

Utility class for menus based on category collections of pages.

Returns all the relevant pages for rendering with a menu content object.

Definition at line 26 of file CategoryMenuUtility.php.

Member Function Documentation

collectPages (   $selectedCategories,

Collects all pages for the selected categories, sorted according to configuration.

string$selectedCategoriesComma-separated list of system categories primary keys
array$configurationTypoScript configuration for the "special." keyword
\TYPO3\CMS\Frontend\ContentObject\Menu\AbstractMenuContentObject$parentObjectBack-reference to the calling object
string List of selected pages

Definition at line 41 of file CategoryMenuUtility.php.

References GeneralUtility\intExplode(), CategoryCollection\load(), and CategoryMenuUtility\sortPages().

sortPages (   $pages,

Sorts the selected pages

If the sorting field is not defined or does not corresponding to an existing field of the "pages" tables, the list of pages will remain unchanged.

array$pagesList of selected pages
string$orderOrder for sorting (should "asc" or "desc")
array Sorted list of pages

Definition at line 105 of file CategoryMenuUtility.php.

Referenced by CategoryMenuUtility\collectPages().

static sortPagesUtility (   $pageA,

Static utility for sorting pages according to the selected criterion

array$pageARecord for first page to be compared
array$pageBRecord for second page to be compared
array -1 if first argument is smaller than second argument, 1 if first is greater than second and 0 if both are equal

Definition at line 142 of file CategoryMenuUtility.php.

Member Data Documentation


Definition at line 31 of file CategoryMenuUtility.php.