RedirectRepository
Class for accessing redirect records from the database
Table of Contents
Methods
- __construct() : mixed
- countActiveRedirects() : int
- countRedirectsByDemand() : int
- findCreationTypes() : array<string|int, mixed>
- Get all used creation types
- findCreators() : array<int, array<string, mixed>>
- Get the backend users, which created at least one redirect, as a map of their uid and their be_users record. Redirects without a tracked creator are mapped to the "0" key. Deleted backend users are not resolved, so an empty record means the user is either untracked or gone, leaving it to the consumer to label those cases.
- findHostsOfRedirects() : array<string|int, mixed>
- Get all used hosts
- findIntegrityStatusCodes() : array<string|int, mixed>
- Get all used integrity status codes
- findRedirectsByDemand() : array<string|int, mixed>
- Used within the backend module, which also includes the hidden records, but never deleted records.
- findRedirectTypes() : array<string|int, mixed>
- Get all available redirect_types
- findStatusCodesOfRedirects() : array<string|int, mixed>
- 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
__construct()
public
__construct(TcaSchemaFactory $schemaFactory, RedirectPermissionGuard $redirectPermissionGuard, ConnectionPool $connectionPool) : mixed
Parameters
- $schemaFactory : TcaSchemaFactory
- $redirectPermissionGuard : RedirectPermissionGuard
- $connectionPool : ConnectionPool
countActiveRedirects()
public
countActiveRedirects() : int
Return values
intcountRedirectsByDemand()
public
countRedirectsByDemand(Demand $demand) : int
Parameters
- $demand : Demand
Return values
intfindCreationTypes()
Get all used creation types
public
findCreationTypes([string|null $type = null ]) : array<string|int, mixed>
Parameters
- $type : string|null = null
Return values
array<string|int, mixed>findCreators()
Get the backend users, which created at least one redirect, as a map of their uid and their be_users record. Redirects without a tracked creator are mapped to the "0" key. Deleted backend users are not resolved, so an empty record means the user is either untracked or gone, leaving it to the consumer to label those cases.
public
findCreators([string|null $type = null ]) : array<int, array<string, mixed>>
Parameters
- $type : string|null = null
Return values
array<int, array<string, mixed>>findHostsOfRedirects()
Get all used hosts
public
findHostsOfRedirects([string|null $type = null ]) : array<string|int, mixed>
Parameters
- $type : string|null = null
Return values
array<string|int, mixed>findIntegrityStatusCodes()
Get all used integrity status codes
public
findIntegrityStatusCodes([string|null $type = null ]) : array<string|int, mixed>
Parameters
- $type : string|null = null
Return values
array<string|int, mixed>findRedirectsByDemand()
Used within the backend module, which also includes the hidden records, but never deleted records.
public
findRedirectsByDemand(Demand $demand) : array<string|int, mixed>
Parameters
- $demand : Demand
Return values
array<string|int, mixed>findRedirectTypes()
Get all available redirect_types
public
findRedirectTypes() : array<string|int, mixed>
Return values
array<string|int, mixed>findStatusCodesOfRedirects()
Get all used status codes
public
findStatusCodesOfRedirects([string|null $type = null ]) : array<string|int, mixed>
Parameters
- $type : string|null = null
Return values
array<string|int, mixed>removeByDemand()
public
removeByDemand(Demand $demand) : void
Parameters
- $demand : Demand
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
getBackendUser()
protected
getBackendUser() : BackendUserAuthentication
Return values
BackendUserAuthenticationgetGroupedRows()
protected
getGroupedRows(string $field, string $as[, string|null $type = 'default' ]) : array<int, array<string, scalar|null>>
Parameters
- $field : string
- $as : string
- $type : string|null = 'default'
Return values
array<int, array<string, scalar|null>>getQueryBuilder()
protected
getQueryBuilder() : QueryBuilder
Return values
QueryBuildergetQueryBuilderForDemand()
Prepares the QueryBuilder with Constraints from the Demand
protected
getQueryBuilderForDemand(Demand $demand[, bool $createCountQuery = false ]) : QueryBuilder
Parameters
- $demand : Demand
- $createCountQuery : bool = false
Return values
QueryBuildersortOutInaccessibleRedirects()
protected
sortOutInaccessibleRedirects(array<int, array<string|int, mixed>> $redirects) : array<int, array<string|int, mixed>>
Parameters
- $redirects : array<int, array<string|int, mixed>>