TYPO3 CMS  TYPO3_7-6
TYPO3\CMS\Frontend\ContentObject\Menu\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()

TYPO3\CMS\Frontend\ContentObject\Menu\CategoryMenuUtility::collectPages (   $selectedCategories,
  $configuration,
  $parentObject 
)

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

Parameters
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
Returns
string List of selected pages

Definition at line 41 of file CategoryMenuUtility.php.

References $uid, TYPO3\CMS\Core\Utility\GeneralUtility\intExplode(), TYPO3\CMS\Frontend\Category\Collection\CategoryCollection\load(), and TYPO3\CMS\Frontend\ContentObject\Menu\CategoryMenuUtility\sortPages().

◆ sortPages()

TYPO3\CMS\Frontend\ContentObject\Menu\CategoryMenuUtility::sortPages (   $pages,
  $order 
)
protected

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.

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

Definition at line 105 of file CategoryMenuUtility.php.

Referenced by TYPO3\CMS\Frontend\ContentObject\Menu\CategoryMenuUtility\collectPages().

◆ sortPagesUtility()

static TYPO3\CMS\Frontend\ContentObject\Menu\CategoryMenuUtility::sortPagesUtility (   $pageA,
  $pageB 
)
static

Static utility for sorting pages according to the selected criterion

Parameters
array$pageARecord for first page to be compared
array$pageBRecord for second page to be compared
Returns
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

◆ $sortingField

TYPO3\CMS\Frontend\ContentObject\Menu\CategoryMenuUtility::$sortingField
staticprotected

Definition at line 31 of file CategoryMenuUtility.php.