DeletedRecords

class \TYPO3\CMS\Recycler\Domain\Model\DeletedRecords

Model class for the 'recycler' extension.

Table of Contents

Properties

$label  : array
Array with all label fields from different tables
$title  : array
Array with all title fields from different tables
$deletedRows  : array
Array with all deleted rows
$limit  : string
String with the global limit
$table  : array
Array with all available FE tables

Methods

deleteData()  : bool
Delete element from any table
getDeletedRows()  : array
Get deleted Rows
getTable()  : array
Get table
getTotalCount()  : int
Find the total count of deleted records
loadData()  : DeletedRecords
Load all deleted rows from $table If table is not set, it iterates the TCA tables
setDeletedRows()  : mixed
Set deleted rows
undeleteData()  : bool|int
Undelete records If $recursive is TRUE all records below the page uid would be undelete too
checkRecordAccess()  : mixed
Checks whether the current backend user has access to the given records.
getBackendUser()  : BackendUserAuthentication
getCache()  : FrontendInterface
Gets an instance of the memory cache.
getDeletedParentPages()  : array
Returns deleted parent pages
getFilteredQueryBuilder()  : QueryBuilder
Helper method for setData() to create a QueryBuilder that filters the records by default.
getTreeList()  : array
Get tree list
resolveTree()  : array
setData()  : mixed
Set all deleted rows

Properties

$label

Array with all label fields from different tables

public array $label

$title

Array with all title fields from different tables

public array $title

$deletedRows

Array with all deleted rows

protected array $deletedRows = []

$limit

String with the global limit

protected string $limit = ''

$table

Array with all available FE tables

protected array $table = []

Methods

deleteData()

Delete element from any table

public deleteData(array|null $recordsArray) : bool

Parameters

$recordsArray : array|null

Representation of the records

Return values

bool

getDeletedRows()

Get deleted Rows

public getDeletedRows() : array

Return values

array —

Array with all deleted rows from TCA

getTable()

Get table

public getTable() : array

Return values

array —

Array with table from TCA

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

int

loadData()

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 = '' ]) : DeletedRecords

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

DeletedRecords

setDeletedRows()

Set deleted rows

public setDeletedRows(string $table, array $row) : mixed

Parameters

$table : string

Tablename

$row : array

Deleted record row

undeleteData()

Undelete records If $recursive is TRUE all records below the page uid would be undelete too

public undeleteData(array $recordsArray[, bool $recursive = false ]) : bool|int

Parameters

$recordsArray : array

Representation of the records

$recursive : bool = false

Whether to recursively undelete

Return values

bool|int

checkRecordAccess()

Checks whether the current backend user has access to the given records.

protected checkRecordAccess(string $table, array $rows) : mixed

Parameters

$table : string

Name of the table

$rows : array

Record row

getDeletedParentPages()

Returns deleted parent pages

protected getDeletedParentPages(int $uid[, array &$pages = [] ]) : array

Parameters

$uid : int
$pages : array = []

Return values

array

getFilteredQueryBuilder()

Helper method for setData() to create a QueryBuilder that filters the records by default.

protected getFilteredQueryBuilder(string $table, int $pid, int $depth, string $filter) : QueryBuilder

Parameters

$table : string
$pid : int
$depth : int
$filter : string

Return values

QueryBuilder

getTreeList()

Get tree list

protected getTreeList(int $id, int $depth[, int $begin = 0 ]) : array

Parameters

$id : int
$depth : int
$begin : int = 0

Return values

array

resolveTree()

protected resolveTree(int $id, int $depth[, int $begin = 0 ][, string $permsClause = '' ]) : array

Parameters

$id : int
$depth : int
$begin : int = 0
$permsClause : string = ''

Return values

array

setData()

Set all deleted rows

protected setData(int $id, string $table, int $depth, string $filter) : mixed

Parameters

$id : int

UID from record

$table : string

Tablename from record

$depth : int

How many levels recursive

$filter : string

Filter text

On this page