CategoryMenuUtility

Utility class for menus based on category collections of pages.

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

Internal

this is only used for internal purposes and solely used for EXT:frontend and not part of TYPO3's Core API.

Table of Contents

Properties

$sortingField  : string

Methods

collectPages()  : array<string|int, mixed>
Collects all pages for the selected categories, sorted according to configuration.
sortPages()  : array<string|int, mixed>
Sorts the selected pages

Properties

$sortingField

protected static string $sortingField

Name of the field used for sorting the pages

Methods

collectPages()

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

public collectPages(string $selectedCategories, array<string|int, mixed>|null $configuration, AbstractMenuContentObject $parentObject) : array<string|int, mixed>
Parameters
$selectedCategories : string

Comma-separated list of system categories primary keys

$configuration : array<string|int, mixed>|null

TypoScript configuration for the "special." keyword

$parentObject : AbstractMenuContentObject

Back-reference to the calling object

Return values
array<string|int, mixed>

List of selected pages

sortPages()

Sorts the selected pages

protected sortPages(array<string|int, mixed> $pages, string $order) : array<string|int, mixed>

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
$pages : array<string|int, mixed>

List of selected pages

$order : string

Order for sorting (should "asc" or "desc")

Return values
array<string|int, mixed>

Sorted list of pages


        
On this page

Search results