‪TYPO3CMS  10.4
TYPO3\CMS\Recycler\Utility\RecyclerUtility Class Reference

Static Public Member Functions

static bool checkAccess ($table, $row)
 
static string getRecordPath ($uid)
 
static string getDeletedField ($tableName)
 
static bool isParentPageDeleted ($pid)
 
static int getPidOfUid ($uid, $table)
 
static array false getTableTCA ($tableName)
 
static getModifyableTables ()
 

Static Protected Member Functions

static TYPO3 CMS Core Authentication BackendUserAuthentication getBackendUser ()
 
static TYPO3 CMS Core Localization LanguageService getLanguageService ()
 

Detailed Description

Helper class for the 'recycler' extension.

Definition at line 27 of file RecyclerUtility.php.

Member Function Documentation

◆ checkAccess()

static bool 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$table‪The table to check access for
array$row‪Record array
Returns
‪bool Returns TRUE is the user has access, or FALSE if not

Definition at line 42 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 Core Authentication BackendUserAuthentication TYPO3\CMS\Recycler\Utility\RecyclerUtility::getBackendUser ( )
staticprotected

Returns the BackendUser

Returns
‪\TYPO3\CMS\Core\Authentication\BackendUserAuthentication

Definition at line 203 of file RecyclerUtility.php.

References $GLOBALS.

◆ getDeletedField()

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

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

Parameters
string$tableName‪Name 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 128 of file RecyclerUtility.php.

References TYPO3\CMS\Recycler\Utility\RecyclerUtility\getTableTCA().

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

◆ getLanguageService()

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

Returns an instance of LanguageService

Returns
‪\TYPO3\CMS\Core\Localization\LanguageService

Definition at line 213 of file RecyclerUtility.php.

References $GLOBALS.

◆ getModifyableTables()

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

Returns the modifiable tables of the current user

Definition at line 221 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 int TYPO3\CMS\Recycler\Utility\RecyclerUtility::getPidOfUid (   $uid,
  $table 
)
static

Get pid of uid

Parameters
int$uid
string$table
Returns
‪int

Definition at line 168 of file RecyclerUtility.php.

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

◆ getRecordPath()

static string TYPO3\CMS\Recycler\Utility\RecyclerUtility::getRecordPath (   $uid)
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$uid‪Page uid for which to create record path
Returns
‪string Path of record (string) OR array with short/long title if $fullTitleLimit is set.

Definition at line 84 of file RecyclerUtility.php.

References $output, TYPO3\CMS\Backend\Utility\BackendUtility\fixVersioningPid(), and TYPO3\CMS\Backend\Utility\BackendUtility\workspaceOL().

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

◆ getTableTCA()

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

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

Parameters
string$tableName‪Name of the table to get TCA for
Returns
‪array|false TCA of the table used in the current context

Definition at line 189 of file RecyclerUtility.php.

References $GLOBALS.

Referenced by TYPO3\CMS\Recycler\Utility\RecyclerUtility\getDeletedField().

◆ isParentPageDeleted()

static bool TYPO3\CMS\Recycler\Utility\RecyclerUtility::isParentPageDeleted (   $pid)
static

Check if parent record is deleted

Parameters
int$pid
Returns
‪bool

Definition at line 143 of file RecyclerUtility.php.

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