TYPO3  7.6
Public Member Functions | Public Attributes | Protected Member Functions | Protected Attributes | List of all members
DeletedRecords Class Reference

Public Member Functions

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

Public Attributes

 $label
 
 $title
 

Protected Member Functions

 setData ($id, $table, $depth, $tcaCtrl, $filter)
 
 checkRecordAccess ($table, array $rows)
 
 escapeValueForLike ($value, $tableName)
 
 getDatabaseConnection ()
 

Protected Attributes

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

Detailed Description

Model class for the 'recycler' extension.

Definition at line 24 of file DeletedRecords.php.

Member Function Documentation

checkRecordAccess (   $table,
array  $rows 
)
protected

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

Parameters
string$tableName of the table
array$rowsRecord row
Returns
void

Definition at line 256 of file DeletedRecords.php.

References DeletedRecords\$table, RecyclerUtility\checkAccess(), and DeletedRecords\setDeletedRows().

Referenced by DeletedRecords\setData().

escapeValueForLike (   $value,
  $tableName 
)
protected

Escapes a value to be used for like in a database query. There is a special handling for the characters '' and '_'.

Parameters
string$valueThe value to be escaped for like conditions
string$tableNameThe name of the table the query should be used for
Returns
string The escaped value to be used for like conditions

Definition at line 273 of file DeletedRecords.php.

References DeletedRecords\getDatabaseConnection().

Referenced by DeletedRecords\setData().

getDatabaseConnection ( )
protected

Returns an instance of DatabaseConnection

Returns

Definition at line 390 of file DeletedRecords.php.

References $GLOBALS.

Referenced by DeletedRecords\escapeValueForLike(), and DeletedRecords\setData().

getDeletedRows ( )

Get deleted Rows

Returns
array Array with all deleted rows from TCA

Definition at line 370 of file DeletedRecords.php.

References DeletedRecords\$deletedRows.

Referenced by DeletedRecords\undeleteData().

getTable ( )

Get table

Returns
array Array with table from TCA

Definition at line 380 of file DeletedRecords.php.

References DeletedRecords\$table.

getTotalCount (   $id,
  $table,
  $depth,
  $filter 
)

Find the total count of deleted records

Parameters
int$idUID from record
string$tableTablename from record
int$depthHow many levels recursive
string$filterFilter text
Returns
int

Definition at line 119 of file DeletedRecords.php.

References DeletedRecords\$table, and DeletedRecords\loadData().

loadData (   $id,
  $table,
  $depth,
  $limit = '',
  $filter = '' 
)

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

Parameters
int$idUID from selected page
string$tableTablename
int$depthHow many levels recursive
string$limitMySQL LIMIT
string$filterFilter text
Returns
DeletedRecords

Definition at line 84 of file DeletedRecords.php.

References $GLOBALS, DeletedRecords\$limit, DeletedRecords\$table, RecyclerUtility\getModifyableTables(), DeletedRecords\setData(), and GeneralUtility\trimExplode().

Referenced by DeletedRecords\getTotalCount(), and DeletedRecords\undeleteData().

setData (   $id,
  $table,
  $depth,
  $tcaCtrl,
  $filter 
)
protected

Set all deleted rows

Parameters
int$idUID from record
string$tableTablename from record
int$depthHow many levels recursive
array$tcaCtrlTCA CTRL array
string$filterFilter text
Returns
void

Definition at line 139 of file DeletedRecords.php.

References DeletedRecords\$limit, DeletedRecords\$table, DeletedRecords\checkRecordAccess(), DeletedRecords\escapeValueForLike(), DeletedRecords\getDatabaseConnection(), RecyclerUtility\getDeletedField(), and GeneralUtility\trimExplode().

Referenced by DeletedRecords\loadData().

setDeletedRows (   $table,
array  $row 
)

Set deleted rows

Parameters
string$tableTablename
array$rowDeleted record row
Returns
void

Definition at line 357 of file DeletedRecords.php.

References DeletedRecords\$table.

Referenced by DeletedRecords\checkRecordAccess().

undeleteData (   $recordsArray,
  $recursive = false 
)

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

Parameters
array$recordsArrayRepresentation of the records
bool$recursiveWhether to recursively undelete
Returns
bool

Definition at line 315 of file DeletedRecords.php.

References DeletedRecords\$table, DeletedRecords\getDeletedRows(), DeletedRecords\loadData(), and GeneralUtility\makeInstance().

Member Data Documentation

$deletedRows = array()
protected

Definition at line 31 of file DeletedRecords.php.

Referenced by DeletedRecords\getDeletedRows().

$label

Definition at line 59 of file DeletedRecords.php.

$limit = ''
protected

Definition at line 38 of file DeletedRecords.php.

Referenced by DeletedRecords\loadData(), and DeletedRecords\setData().

$recyclerHelper
protected

Definition at line 52 of file DeletedRecords.php.

$table = array()
protected
$title

Definition at line 66 of file DeletedRecords.php.