RedirectRepository

class \TYPO3\CMS\Redirects\Repository\RedirectRepository

Class for accessing redirect records from the database

Table of Contents

Methods

__construct()  : mixed
countRedirectsByDemand()  : int
findCreationTypes()  : array
Get all used creation types
findHostsOfRedirects()  : array
Get all used hosts
findRedirectsByDemand()  : array
Used within the backend module, which also includes the hidden records, but never deleted records.
findStatusCodesOfRedirects()  : array
Get all used status codes
removeByDemand()  : void
addSourceHostConstraint()  : void
Adds source host constraint to query for non-admin users This significantly reduces the dataset before PHP filtering
getBackendUser()  : BackendUserAuthentication
getGroupedRows()  : array<int, array<string, scalar|null>>
getQueryBuilder()  : QueryBuilder
getQueryBuilderForDemand()  : QueryBuilder
Prepares the QueryBuilder with Constraints from the Demand
sortOutInaccessibleRedirects()  : array<int, array<string|int, mixed>>

Methods

countRedirectsByDemand()

public countRedirectsByDemand(Demand $demand) : int

Parameters

$demand : Demand

Return values

int

findCreationTypes()

Get all used creation types

public findCreationTypes() : array

Return values

array

findHostsOfRedirects()

Get all used hosts

public findHostsOfRedirects() : array

Return values

array

findRedirectsByDemand()

Used within the backend module, which also includes the hidden records, but never deleted records.

public findRedirectsByDemand(Demand $demand) : array

Parameters

$demand : Demand

Return values

array

findStatusCodesOfRedirects()

Get all used status codes

public findStatusCodesOfRedirects() : array

Return values

array

addSourceHostConstraint()

Adds source host constraint to query for non-admin users This significantly reduces the dataset before PHP filtering

protected addSourceHostConstraint(QueryBuilder $queryBuilder) : void

Parameters

$queryBuilder : QueryBuilder

Tags

throws
StopQueryException

getGroupedRows()

protected getGroupedRows(string $field, string $as) : array<int, array<string, scalar|null>>

Parameters

$field : string
$as : string

Return values

array<int, array<string, scalar|null>>

getQueryBuilderForDemand()

Prepares the QueryBuilder with Constraints from the Demand

protected getQueryBuilderForDemand(Demand $demand[, bool $createCountQuery = false ]) : QueryBuilder

Parameters

$demand : Demand
$createCountQuery : bool = false

Return values

QueryBuilder

sortOutInaccessibleRedirects()

protected sortOutInaccessibleRedirects(array<int, array<string|int, mixed>> $redirects) : array<int, array<string|int, mixed>>

Parameters

$redirects : array<int, array<string|int, mixed>>

Return values

array<int, array<string|int, mixed>>
On this page