TYPO3  7.6
Static Public Member Functions | Static Protected Member Functions | List of all members
RecyclerUtility Class Reference

Static Public Member Functions

static checkAccess ($table, $row)
 
static getRecordPath ($uid, $clause= '', $titleLimit=1000, $fullTitleLimit=0)
 
static getDeletedField ($tableName)
 
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

static 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 Permission\CONTENT_EDIT, BackendUtility\fixVersioningPid(), BackendUtility\getRecord(), and Permission\PAGE_EDIT.

Referenced by DeletedRecords\checkRecordAccess().

static getBackendUser ( )
staticprotected

Returns the BackendUser

Returns

Definition at line 201 of file RecyclerUtility.php.

References $GLOBALS.

static getCurrentCharset ( )
static

Gets the current backend charset.

Returns
string The current backend charset

Definition at line 156 of file RecyclerUtility.php.

References $lang.

static getDatabaseConnection ( )
staticprotected

Returns an instance of DatabaseConnection

Returns

Definition at line 191 of file RecyclerUtility.php.

References $GLOBALS.

static 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 127 of file RecyclerUtility.php.

Referenced by Tables\getTables(), and DeletedRecords\setData().

static getLanguageService ( )
staticprotected

Returns an instance of LanguageService

Returns

Definition at line 211 of file RecyclerUtility.php.

References $GLOBALS.

static getModifyableTables ( )
static

Returns the modifyable tables of the current user

Definition at line 219 of file RecyclerUtility.php.

References $GLOBALS.

Referenced by Tables\getTables(), and DeletedRecords\loadData().

static 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 80 of file RecyclerUtility.php.

References GeneralUtility\fixed_lgd_cs(), BackendUtility\fixVersioningPid(), and BackendUtility\workspaceOL().

Referenced by DeletedRecordsController\transform().

static 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 142 of file RecyclerUtility.php.

References $GLOBALS.

static 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 178 of file RecyclerUtility.php.

Referenced by Tables\getTables(), and DeletedRecordsController\transform().

static isNotUtf8Charset ( )
static

Determines whether the current charset is not UTF-8

Returns
bool Whether the current charset is not UTF-8

Definition at line 167 of file RecyclerUtility.php.