TYPO3 CMS  TYPO3_7-6
TYPO3\CMS\Recycler\Utility\RecyclerUtility Class Reference

Static Public Member Functions

static checkAccess ($table, $row)
 
static getRecordPath ($uid, $clause='', $titleLimit=1000, $fullTitleLimit=0)
 
static getDeletedField ($tableName)
 
static getPidOfUid ($uid, $table)
 
static getTableTCA ($tableName)
 
static getCurrentCharset ()
 
static isNotUtf8Charset ()
 
static getUtf8String ($string)
 
static getModifyableTables ()
 

Static Protected Member Functions

static getDatabaseConnection ()
 
static getBackendUser ()
 
static getLanguageService ()
 

Detailed Description

Helper class for the 'recycler' extension.

Definition at line 24 of file RecyclerUtility.php.

Member Function Documentation

◆ checkAccess()

static TYPO3\CMS\Recycler\Utility\RecyclerUtility::checkAccess (   $table,
  $row 
)
static

Checks the page access rights (Code for access check mostly taken from FormEngine) as well as the table access rights of the user.

Parameters
string$tableThe table to check access for
string$rowRecord array
Returns
bool Returns TRUE is the user has access, or FALSE if not

Definition at line 39 of file RecyclerUtility.php.

References TYPO3\CMS\Core\Type\Bitmask\Permission\CONTENT_EDIT, TYPO3\CMS\Backend\Utility\BackendUtility\fixVersioningPid(), TYPO3\CMS\Backend\Utility\BackendUtility\getRecord(), and TYPO3\CMS\Core\Type\Bitmask\Permission\PAGE_EDIT.

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

◆ getBackendUser()

static TYPO3\CMS\Recycler\Utility\RecyclerUtility::getBackendUser ( )
staticprotected

Returns the BackendUser

Returns

Definition at line 218 of file RecyclerUtility.php.

References $GLOBALS.

◆ getCurrentCharset()

static TYPO3\CMS\Recycler\Utility\RecyclerUtility::getCurrentCharset ( )
static

Gets the current backend charset.

Returns
string The current backend charset

Definition at line 173 of file RecyclerUtility.php.

◆ getDatabaseConnection()

static TYPO3\CMS\Recycler\Utility\RecyclerUtility::getDatabaseConnection ( )
staticprotected

Returns an instance of DatabaseConnection

Returns

Definition at line 208 of file RecyclerUtility.php.

References $GLOBALS.

◆ getDeletedField()

static TYPO3\CMS\Recycler\Utility\RecyclerUtility::getDeletedField (   $tableName)
static

Gets the name of the field with the information whether a record is deleted.

Parameters
string$tableNameName of the table to get the deleted field for
Returns
string Name of the field with the information whether a record is deleted

Definition at line 126 of file RecyclerUtility.php.

References $TCA.

Referenced by TYPO3\CMS\Recycler\Domain\Model\Tables\getTables(), and TYPO3\CMS\Recycler\Domain\Model\DeletedRecords\setData().

◆ getLanguageService()

static TYPO3\CMS\Recycler\Utility\RecyclerUtility::getLanguageService ( )
staticprotected

Returns an instance of LanguageService

Returns

Definition at line 228 of file RecyclerUtility.php.

References $GLOBALS.

◆ getModifyableTables()

static TYPO3\CMS\Recycler\Utility\RecyclerUtility::getModifyableTables ( )
static

Returns the modifyable tables of the current user

Definition at line 236 of file RecyclerUtility.php.

References $GLOBALS.

Referenced by TYPO3\CMS\Recycler\Domain\Model\Tables\getTables(), and TYPO3\CMS\Recycler\Domain\Model\DeletedRecords\loadData().

◆ getPidOfUid()

static TYPO3\CMS\Recycler\Utility\RecyclerUtility::getPidOfUid (   $uid,
  $table 
)
static

Get pid of uid

Parameters
int$uid
string$table
Returns
int

Definition at line 142 of file RecyclerUtility.php.

References $uid.

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

◆ getRecordPath()

static TYPO3\CMS\Recycler\Utility\RecyclerUtility::getRecordPath (   $uid,
  $clause = '',
  $titleLimit = 1000,
  $fullTitleLimit = 0 
)
static

Returns the path (visually) of a page $uid, fx. "/First page/Second page/Another subpage" Each part of the path will be limited to $titleLimit characters Deleted pages are filtered out.

Parameters
int$uidPage uid for which to create record path
string$clauseis additional where clauses, eg.
int$titleLimitTitle limit
int$fullTitleLimitTitle limit of Full title (typ. set to 1000 or so)
Returns
mixed Path of record (string) OR array with short/long title if $fullTitleLimit is set.

Definition at line 79 of file RecyclerUtility.php.

References $uid, TYPO3\CMS\Core\Utility\GeneralUtility\fixed_lgd_cs(), TYPO3\CMS\Backend\Utility\BackendUtility\fixVersioningPid(), and TYPO3\CMS\Backend\Utility\BackendUtility\workspaceOL().

Referenced by TYPO3\CMS\Recycler\Controller\DeletedRecordsController\transform().

◆ getTableTCA()

static TYPO3\CMS\Recycler\Utility\RecyclerUtility::getTableTCA (   $tableName)
static

Gets the TCA of the table used in the current context.

Parameters
string$tableNameName of the table to get TCA for
Returns
array|FALSE TCA of the table used in the current context

Definition at line 159 of file RecyclerUtility.php.

References $GLOBALS, and $TCA.

◆ getUtf8String()

static TYPO3\CMS\Recycler\Utility\RecyclerUtility::getUtf8String (   $string)
static

Gets an UTF-8 encoded string (only if the current charset is not UTF-8!).

Parameters
string$stringString to be converted to UTF-8 if required
Returns
string UTF-8 encoded string

Definition at line 195 of file RecyclerUtility.php.

Referenced by TYPO3\CMS\Recycler\Domain\Model\Tables\getTables(), and TYPO3\CMS\Recycler\Controller\DeletedRecordsController\transform().

◆ isNotUtf8Charset()

static TYPO3\CMS\Recycler\Utility\RecyclerUtility::isNotUtf8Charset ( )
static

Determines whether the current charset is not UTF-8

Returns
bool Whether the current charset is not UTF-8

Definition at line 184 of file RecyclerUtility.php.