DeletedRecords
Model class for the 'recycler' extension.
This class is a specific domain model implementation and is not part of the Public TYPO3 API.
Attributes
- #[Autoconfigure]
- $public: true
Table of Contents
Properties
- $deletedRows : array<string|int, mixed>
- Array with all deleted rows
- $limit : string
- String with the global limit
- $runtimeCache : FrontendInterface
- $table : array<string|int, mixed>
- Array with all available tables
Methods
- __construct() : mixed
- deleteData() : bool
- Delete element from any table
- getDeletedRows() : array<string|int, mixed>
- getTotalCount() : int
- Find the total count of deleted records
- loadData() : self
- Load all deleted rows from $table If table is not set, it iterates the TCA tables
- undeleteData() : bool|int
- Undelete records If $recursive is TRUE all records below the page uid would be undelete too
- checkAccess() : bool
- Checks the page access rights (Code for access check mostly taken from FormEngine) as well as the table access rights of the user.
- checkRecordAccess() : void
- Checks whether the current backend user has access to the given records.
- getBackendUser() : BackendUserAuthentication
- getDeletedParentPages() : array<string|int, mixed>
- Returns deleted parent pages
- getFilteredQueryBuilder() : QueryBuilder
- Helper method for setData() to create a QueryBuilder that filters the records by default.
- getPidOfUid() : int
- Get pid of uid
- getRelevantSchemata() : array<string|int, TcaSchema>
- Returns the modifiable tables of the current user, which have a SoftDelete field.
- getTreeList() : array<string|int, mixed>
- resolveTree() : array<string|int, mixed>
- setData() : void
- Set all deleted rows
- setDeletedRows() : void
Properties
$deletedRows
Array with all deleted rows
protected
array<string|int, mixed>
$deletedRows
= []
$limit
String with the global limit
protected
string
$limit
= ''
$runtimeCache read-only
protected
FrontendInterface
$runtimeCache
Attributes
- #[Autowire]
- $service: 'cache.runtime'
$table
Array with all available tables
protected
array<string|int, mixed>
$table
= []
Methods
__construct()
public
__construct(TcaSchemaFactory $tcaSchemaFactory, FrontendInterface $runtimeCache) : mixed
Parameters
- $tcaSchemaFactory : TcaSchemaFactory
- $runtimeCache : FrontendInterface
deleteData()
Delete element from any table
public
deleteData(array<string|int, mixed>|null $recordsArray) : bool
Parameters
- $recordsArray : array<string|int, mixed>|null
-
Representation of the records
Return values
boolgetDeletedRows()
public
getDeletedRows() : array<string|int, mixed>
Return values
array<string|int, mixed>getTotalCount()
Find the total count of deleted records
public
getTotalCount(int $id, string $table, int $depth, string $filter) : int
Parameters
- $id : int
-
UID from record
- $table : string
-
Tablename from record
- $depth : int
-
How many levels recursive
- $filter : string
-
Filter text
Return values
intloadData()
Load all deleted rows from $table If table is not set, it iterates the TCA tables
public
loadData(int $id, string $table, int $depth[, string $limit = '' ][, string $filter = '' ]) : self
Parameters
- $id : int
-
UID from selected page
- $table : string
-
Tablename
- $depth : int
-
How many levels recursive
- $limit : string = ''
-
MySQL LIMIT
- $filter : string = ''
-
Filter text
Return values
selfundeleteData()
Undelete records If $recursive is TRUE all records below the page uid would be undelete too
public
undeleteData(array<string|int, mixed> $recordsArray[, bool $recursive = false ]) : bool|int
Parameters
- $recordsArray : array<string|int, mixed>
-
Representation of the records
- $recursive : bool = false
-
Whether to recursively undelete
Return values
bool|intcheckAccess()
Checks the page access rights (Code for access check mostly taken from FormEngine) as well as the table access rights of the user.
protected
checkAccess(string $table, array<string|int, mixed> $row) : bool
Parameters
- $table : string
-
The table to check access for
- $row : array<string|int, mixed>
-
Record array
Return values
bool —Returns TRUE is the user has access, or FALSE if not
checkRecordAccess()
Checks whether the current backend user has access to the given records.
protected
checkRecordAccess(string $table, array<string|int, mixed> $rows) : void
Parameters
- $table : string
-
Name of the table
- $rows : array<string|int, mixed>
-
Record row
getBackendUser()
protected
getBackendUser() : BackendUserAuthentication
Return values
BackendUserAuthenticationgetDeletedParentPages()
Returns deleted parent pages
protected
getDeletedParentPages(int $uid[, array<string|int, mixed> &$pages = [] ]) : array<string|int, mixed>
Parameters
- $uid : int
- $pages : array<string|int, mixed> = []
Return values
array<string|int, mixed>getFilteredQueryBuilder()
Helper method for setData() to create a QueryBuilder that filters the records by default.
protected
getFilteredQueryBuilder(TcaSchema $schema, int $pid, int $depth, string $filter) : QueryBuilder
Parameters
- $schema : TcaSchema
- $pid : int
- $depth : int
- $filter : string
Return values
QueryBuildergetPidOfUid()
Get pid of uid
protected
getPidOfUid(int $uid, string $table) : int
Parameters
- $uid : int
- $table : string
Return values
intgetRelevantSchemata()
Returns the modifiable tables of the current user, which have a SoftDelete field.
protected
getRelevantSchemata() : array<string|int, TcaSchema>
Return values
array<string|int, TcaSchema>getTreeList()
protected
getTreeList(int $id, int $depth) : array<string|int, mixed>
Parameters
- $id : int
- $depth : int
Return values
array<string|int, mixed>resolveTree()
protected
resolveTree(int $id, int $depth, string $permsClause) : array<string|int, mixed>
Parameters
- $id : int
- $depth : int
- $permsClause : string
Return values
array<string|int, mixed>setData()
Set all deleted rows
protected
setData(int $id, TcaSchema $schema, int $depth, string $filter) : void
Parameters
- $id : int
-
UID from record
- $schema : TcaSchema
- $depth : int
-
How many levels recursive
- $filter : string
-
Filter text
setDeletedRows()
protected
setDeletedRows(string $table, array<string|int, mixed> $row) : void
Parameters
- $table : string
- $row : array<string|int, mixed>
-
Deleted record row