SearchCriteria

final readonly class \TYPO3\CMS\Form\Domain\DTO\SearchCriteria

Search criteria for filtering and sorting form lists

Follows TYPO3 Demand pattern naming conventions:

  • searchTerm: Text to search for in form properties
  • orderField: Field name to sort by
  • orderDirection: Sort direction ('asc' or 'desc')
  • limit: Maximum number of results

Table of Contents

Properties

$limit  : int|null
$orderDirection  : string
$orderField  : string
$searchTerm  : string|null

Methods

__construct()  : mixed
fromArray()  : self
fromRequest()  : self
getDefaultOrderDirection()  : string
getLimit()  : int|null
getOrderDirection()  : string
getOrderField()  : string
getParameters()  : array
getReverseOrderDirection()  : string
getSearchTerm()  : string|null
hasConstraints()  : bool
Check if any filter/search constraints are set
hasLimit()  : bool
hasSearchTerm()  : bool

Properties

$orderDirection

public string $orderDirection

$searchTerm

public string|null $searchTerm = null

Methods

__construct()

public __construct([string|null $searchTerm = null ][, string|null $orderField = null ][, string|null $orderDirection = null ][, int|null $limit = null ]) : mixed

Parameters

$searchTerm : string|null = null
$orderField : string|null = null
$orderDirection : string|null = null
$limit : int|null = null

fromArray()

public static fromArray(array $data) : self

Parameters

$data : array

Return values

self

fromRequest()

public static fromRequest(ServerRequestInterface $request) : self

Parameters

$request : ServerRequestInterface

Return values

self

getDefaultOrderDirection()

public getDefaultOrderDirection() : string

Return values

string

getLimit()

public getLimit() : int|null

Return values

int|null

getOrderDirection()

public getOrderDirection() : string

Return values

string

getOrderField()

public getOrderField() : string

Return values

string

getParameters()

public getParameters() : array

Return values

array

getReverseOrderDirection()

public getReverseOrderDirection() : string

Return values

string

getSearchTerm()

public getSearchTerm() : string|null

Return values

string|null

hasConstraints()

Check if any filter/search constraints are set

public hasConstraints() : bool

Return values

bool

hasLimit()

public hasLimit() : bool

Return values

bool

hasSearchTerm()

public hasSearchTerm() : bool

Return values

bool
On this page