‪TYPO3CMS  ‪main
TYPO3\CMS\Recycler\Domain\Model\DeletedRecords Class Reference

Public Member Functions

DeletedRecords loadData ($id, $table, $depth, $limit='', $filter='')
 
int getTotalCount ($id, $table, $depth, $filter)
 
bool deleteData ($recordsArray)
 
bool int undeleteData ($recordsArray, $recursive=false)
 
 setDeletedRows ($table, array $row)
 
array getDeletedRows ()
 
array getTable ()
 

Public Attributes

array $label
 
array $title
 

Protected Member Functions

 setData ($id, $table, $depth, $filter)
 
 getFilteredQueryBuilder (string $table, int $pid, int $depth, string $filter)
 
 checkRecordAccess ($table, array $rows)
 
array getDeletedParentPages ($uid, &$pages=[])
 
 getTreeList (int $id, int $depth, int $begin=0)
 
 resolveTree (int $id, int $depth, int $begin=0, string $permsClause='')
 
 getCache ()
 
 getBackendUser ()
 

Protected Attributes

array $deletedRows = array( )
 
string $limit = ''
 
array $table = array( )
 

Detailed Description

Model class for the 'recycler' extension.

This class is a specific domain model implementation and is not part of the Public TYPO3 API.

Definition at line 37 of file DeletedRecords.php.

Member Function Documentation

◆ checkRecordAccess()

TYPO3\CMS\Recycler\Domain\Model\DeletedRecords::checkRecordAccess (   $table,
array  $rows 
)
protected

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

Parameters
string$table‪Name of the table
array$rows‪Record row

Definition at line 304 of file DeletedRecords.php.

References $GLOBALS, TYPO3\CMS\Recycler\Domain\Model\DeletedRecords\$table, TYPO3\CMS\Recycler\Utility\RecyclerUtility\checkAccess(), and TYPO3\CMS\Recycler\Domain\Model\DeletedRecords\setDeletedRows().

Referenced by TYPO3\CMS\Recycler\Domain\Model\DeletedRecords\setData().

◆ deleteData()

bool TYPO3\CMS\Recycler\Domain\Model\DeletedRecords::deleteData (   $recordsArray)

Delete element from any table

Parameters
array | null$recordsArray‪Representation of the records
Returns
‪bool

Definition at line 337 of file DeletedRecords.php.

References TYPO3\CMS\Webhooks\Message\$record, TYPO3\CMS\Recycler\Domain\Model\DeletedRecords\$table, and TYPO3\CMS\Webhooks\Message\$uid.

◆ getBackendUser()

◆ getCache()

TYPO3\CMS\Recycler\Domain\Model\DeletedRecords::getCache ( )
protected

Gets an instance of the memory cache.

Definition at line 530 of file DeletedRecords.php.

Referenced by TYPO3\CMS\Recycler\Domain\Model\DeletedRecords\getTreeList().

◆ getDeletedParentPages()

array TYPO3\CMS\Recycler\Domain\Model\DeletedRecords::getDeletedParentPages (   $uid,
$pages = [] 
)
protected

◆ getDeletedRows()

array TYPO3\CMS\Recycler\Domain\Model\DeletedRecords::getDeletedRows ( )

Get deleted Rows

Returns
‪array Array with all deleted rows from TCA

Definition at line 466 of file DeletedRecords.php.

References TYPO3\CMS\Recycler\Domain\Model\DeletedRecords\$deletedRows.

Referenced by TYPO3\CMS\Recycler\Domain\Model\DeletedRecords\getTotalCount(), and TYPO3\CMS\Recycler\Domain\Model\DeletedRecords\undeleteData().

◆ getFilteredQueryBuilder()

◆ getTable()

array TYPO3\CMS\Recycler\Domain\Model\DeletedRecords::getTable ( )

Get table

Returns
‪array Array with table from TCA

Definition at line 476 of file DeletedRecords.php.

References TYPO3\CMS\Recycler\Domain\Model\DeletedRecords\$table.

◆ getTotalCount()

int TYPO3\CMS\Recycler\Domain\Model\DeletedRecords::getTotalCount (   $id,
  $table,
  $depth,
  $filter 
)

Find the total count of deleted records

Parameters
int$id‪UID from record
string$table‪Tablename from record
int$depth‪How many levels recursive
string$filter‪Filter text
Returns
‪int

Definition at line 120 of file DeletedRecords.php.

References TYPO3\CMS\Recycler\Domain\Model\DeletedRecords\$table, TYPO3\CMS\Recycler\Domain\Model\DeletedRecords\getDeletedRows(), and TYPO3\CMS\Recycler\Domain\Model\DeletedRecords\loadData().

◆ getTreeList()

◆ loadData()

DeletedRecords TYPO3\CMS\Recycler\Domain\Model\DeletedRecords::loadData (   $id,
  $table,
  $depth,
  $limit = '',
  $filter = '' 
)

Load all deleted rows from $table If table is not set, it iterates the TCA tables

Parameters
int$id‪UID from selected page
string$table‪Tablename
int$depth‪How many levels recursive
string$limit‪MySQL LIMIT
string$filter‪Filter text
Returns
DeletedRecords

Definition at line 85 of file DeletedRecords.php.

References TYPO3\CMS\Recycler\Domain\Model\DeletedRecords\$limit, TYPO3\CMS\Recycler\Domain\Model\DeletedRecords\$table, TYPO3\CMS\Recycler\Utility\RecyclerUtility\getModifyableTables(), TYPO3\CMS\Core\Utility\GeneralUtility\intExplode(), and TYPO3\CMS\Recycler\Domain\Model\DeletedRecords\setData().

Referenced by TYPO3\CMS\Recycler\Domain\Model\DeletedRecords\getTotalCount(), and TYPO3\CMS\Recycler\Domain\Model\DeletedRecords\undeleteData().

◆ resolveTree()

TYPO3\CMS\Recycler\Domain\Model\DeletedRecords::resolveTree ( int  $id,
int  $depth,
int  $begin = 0,
string  $permsClause = '' 
)
protected

◆ setData()

TYPO3\CMS\Recycler\Domain\Model\DeletedRecords::setData (   $id,
  $table,
  $depth,
  $filter 
)
protected

◆ setDeletedRows()

TYPO3\CMS\Recycler\Domain\Model\DeletedRecords::setDeletedRows (   $table,
array  $row 
)

Set deleted rows

Parameters
string$table‪Tablename
array$row‪Deleted record row

Definition at line 453 of file DeletedRecords.php.

References TYPO3\CMS\Recycler\Domain\Model\DeletedRecords\$table.

Referenced by TYPO3\CMS\Recycler\Domain\Model\DeletedRecords\checkRecordAccess().

◆ undeleteData()

bool int TYPO3\CMS\Recycler\Domain\Model\DeletedRecords::undeleteData (   $recordsArray,
  $recursive = false 
)

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

Parameters
array$recordsArray‪Representation of the records
bool$recursive‪Whether to recursively undelete
Returns
‪bool|int

Definition at line 363 of file DeletedRecords.php.

References TYPO3\CMS\Webhooks\Message\$record, TYPO3\CMS\Recycler\Domain\Model\DeletedRecords\$table, TYPO3\CMS\Webhooks\Message\$uid, TYPO3\CMS\Recycler\Domain\Model\DeletedRecords\getDeletedParentPages(), TYPO3\CMS\Recycler\Domain\Model\DeletedRecords\getDeletedRows(), TYPO3\CMS\Recycler\Utility\RecyclerUtility\getPidOfUid(), and TYPO3\CMS\Recycler\Domain\Model\DeletedRecords\loadData().

Member Data Documentation

◆ $deletedRows

array TYPO3\CMS\Recycler\Domain\Model\DeletedRecords::$deletedRows = array( )
protected

Array with all deleted rows

Definition at line 43 of file DeletedRecords.php.

Referenced by TYPO3\CMS\Recycler\Domain\Model\DeletedRecords\getDeletedRows().

◆ $label

array TYPO3\CMS\Recycler\Domain\Model\DeletedRecords::$label

Array with all label fields from different tables

Definition at line 61 of file DeletedRecords.php.

◆ $limit

string TYPO3\CMS\Recycler\Domain\Model\DeletedRecords::$limit = ''
protected

String with the global limit

Definition at line 49 of file DeletedRecords.php.

Referenced by TYPO3\CMS\Recycler\Domain\Model\DeletedRecords\loadData().

◆ $table

◆ $title

array TYPO3\CMS\Recycler\Domain\Model\DeletedRecords::$title

Array with all title fields from different tables

Definition at line 67 of file DeletedRecords.php.