TYPO3 CMS  TYPO3_6-2
TYPO3\CMS\Recycler\Domain\Model\DeletedRecords Class Reference
Inheritance diagram for TYPO3\CMS\Recycler\Domain\Model\DeletedRecords:
tx_recycler_model_deletedRecords

Public Member Functions

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

Public Attributes

 $label
 
 $title
 

Protected Member Functions

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

Protected Attributes

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

Detailed Description

This file is part of the TYPO3 CMS project.

It is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License, either version 2 of the License, or any later version.

For the full copyright and license information, please read the LICENSE.txt file that was distributed with this source code.

The TYPO3 project - inspiring people to share! Model class for the 'recycler' extension.

Author
Julian Kleinhans typo3.nosp@m.@kj1.nosp@m.87.de

Definition at line 22 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
Returns
void

Definition at line 247 of file DeletedRecords.php.

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

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

◆ deleteData()

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

Delete element from any table

Parameters
string$recordArray,Representation of the records
Returns
void

Definition at line 276 of file DeletedRecords.php.

References TYPO3\CMS\Core\Utility\GeneralUtility\makeInstance().

◆ escapeValueForLike()

TYPO3\CMS\Recycler\Domain\Model\DeletedRecords::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$value,The value to be escaped for like conditions
string$tableName,The name of the table the query should be used for
Returns
string The escaped value to be used for like conditions

Definition at line 263 of file DeletedRecords.php.

References $GLOBALS.

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

◆ getDeletedRows()

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

Get deleted Rows

Returns
array $this->deletedRows: Array with all deleted rows from TCA

Definition at line 354 of file DeletedRecords.php.

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

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

◆ getTable()

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

Get table

Returns
array $this->table: Array with table from TCA

Definition at line 363 of file DeletedRecords.php.

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

◆ getTotalCount()

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

Find the total count of deleted records

Parameters
integer$id,UID from record
string$table,Tablename from record
integer$depth,How many levels recursive
string$filter,Filter text
Returns
void

Definition at line 116 of file DeletedRecords.php.

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

◆ loadData()

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
integer$id,UID from selected page
string$table,Tablename
integer$depth,How many levels recursive
integer$limit,MySQL LIMIT
string$filter,Filter text
Returns
recycler_model_delRecords

Definition at line 82 of file DeletedRecords.php.

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

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

◆ setData()

TYPO3\CMS\Recycler\Domain\Model\DeletedRecords::setData (   $id = 0,
  $table,
  $depth,
  $tcaCtrl,
  $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
Returns
void

Definition at line 342 of file DeletedRecords.php.

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

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

◆ undeleteData()

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
string$recordArray,Representation of the records
boolean$recursive,TRUE/FALSE
Returns
boolean

Definition at line 301 of file DeletedRecords.php.

References $result, TYPO3\CMS\Recycler\Domain\Model\DeletedRecords\$table, TYPO3\CMS\Recycler\Domain\Model\DeletedRecords\getDeletedRows(), TYPO3\CMS\Recycler\Domain\Model\DeletedRecords\loadData(), and TYPO3\CMS\Core\Utility\GeneralUtility\makeInstance().

Member Data Documentation

◆ $deletedRows

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

◆ $label

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

Definition at line 57 of file DeletedRecords.php.

◆ $limit

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

◆ $recyclerHelper

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

Definition at line 50 of file DeletedRecords.php.

◆ $table

◆ $title

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

Definition at line 64 of file DeletedRecords.php.