‪TYPO3CMS  11.5
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)
 
TYPO3 CMS Core Database Query QueryBuilder getFilteredQueryBuilder (string $table, int $pid, int $depth, string $filter)
 
 checkRecordAccess ($table, array $rows)
 
array getDeletedParentPages ($uid, &$pages=[])
 
array getTreeList (int $id, int $depth, int $begin=0)
 
array resolveTree (int $id, int $depth, int $begin=0, string $permsClause='')
 
FrontendInterface getCache ()
 
BackendUserAuthentication getBackendUser ()
 

Protected Attributes

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

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 313 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 346 of file DeletedRecords.php.

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

◆ getBackendUser()

◆ getCache()

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

Gets an instance of the memory cache.

Returns
‪FrontendInterface

Definition at line 555 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

Returns deleted parent pages

Parameters
int$uid
array$pages
Returns
‪array

Definition at line 429 of file DeletedRecords.php.

References $GLOBALS, TYPO3\CMS\Recycler\Domain\Model\DeletedRecords\getBackendUser(), and TYPO3\CMS\Core\Database\Connection\PARAM_INT.

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

◆ getDeletedRows()

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

Get deleted Rows

Returns
‪array Array with all deleted rows from TCA

Definition at line 475 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()

TYPO3 CMS Core Database Query QueryBuilder TYPO3\CMS\Recycler\Domain\Model\DeletedRecords::getFilteredQueryBuilder ( string  $table,
int  $pid,
int  $depth,
string  $filter 
)
protected

◆ getTable()

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

Get table

Returns
‪array Array with table from TCA

Definition at line 485 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 126 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()

array TYPO3\CMS\Recycler\Domain\Model\DeletedRecords::getTreeList ( int  $id,
int  $depth,
int  $begin = 0 
)
protected

◆ 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 91 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()

array 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 462 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 372 of file DeletedRecords.php.

References TYPO3\CMS\Recycler\Domain\Model\DeletedRecords\$table, 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 67 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().

◆ $recyclerHelper

RecyclerUtility TYPO3\CMS\Recycler\Domain\Model\DeletedRecords::$recyclerHelper
protected

Object from helper class

Definition at line 61 of file DeletedRecords.php.

◆ $table

◆ $title

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

Array with all title fields from different tables

Definition at line 73 of file DeletedRecords.php.