TYPO3  7.6
Static Public Member Functions | Static Protected Member Functions | Static Protected Attributes | List of all members
BackendUtility Class Reference
Inheritance diagram for BackendUtility:
BackendUtilityFixture LabelFromItemListMergedReturnsCorrectFieldsFixture ProcessedValueForGroupWithMultipleAllowedTablesFixture ProcessedValueForGroupWithOneAllowedTableFixture ProcessedValueForSelectWithMMRelationFixture

Static Public Member Functions

static deleteClause ($table, $tableAlias= '')
 
static getRecord ($table, $uid, $fields= '*', $where= '', $useDeleteClause=true)
 
static getRecordWSOL ($table, $uid, $fields= '*', $where= '', $useDeleteClause=true, $unsetMovePointers=false)
 
static getRecordRaw ($table, $where= '', $fields= '*')
 
static getRecordsByField ($theTable, $theField, $theValue, $whereClause= '', $groupBy= '', $orderBy= '', $limit= '', $useDeleteClause=true)
 
static splitTable_Uid ($str)
 
static getSQLselectableList ($in_list, $tablename, $default_tablename)
 
static BEenableFields ($table, $inv=false)
 
static getRecordLocalization ($table, $uid, $language, $andWhereClause= '')
 
static BEgetRootLine ($uid, $clause= '', $workspaceOL=false)
 
static openPageTree ($pid, $clearExpansion)
 
static getRecordPath ($uid, $clause, $titleLimit, $fullTitleLimit=0)
 
static getExcludeFields ()
 
static getExplicitAuthFieldValues ()
 
static getOriginalTranslationTable ($table)
 
static isTableLocalizable ($table)
 
static getInlineLocalizationMode ($table, $fieldOrConfig)
 
static readPageAccess ($id, $perms_clause)
 
static getTCAtypes ($table, $rec, $useFieldNameAsKey=false)
 
static getTCAtypeValue ($table, $row)
 
static getSpecConfParts ($defaultExtrasString, $_= '')
 
static getSpecConfParametersFromArray ($pArr)
 
static getFlexFormDS ($conf, $row, $table, $fieldName= '', $WSOL=true, $newRecordPidValue=0)
 
static getRegisteredFlexForms ($table= 'tt_content')
 
static getPagesTSconfig ($id, $rootLine=null, $returnPartArray=false)
 
static implodeTSParams ($p, $k= '')
 
static getUserNames ($fields= 'username, usergroup, usergroup_cached_list, uid', $where= '')
 
static getGroupNames ($fields= 'title, uid', $where= '')
 
static getListGroupNames ($fields= 'title, uid')
 
static blindUserNames ($usernames, $groupArray, $excludeBlindedFlag=false)
 
static blindGroupNames ($groups, $groupArray, $excludeBlindedFlag=false)
 
static daysUntil ($tstamp)
 
static date ($tstamp)
 
static datetime ($value)
 
static time ($value, $withSeconds=true)
 
static calcAge ($seconds, $labels= 'min|hrs|days|yrs|min|hour|day|year')
 
static dateTimeAge ($tstamp, $prefix=1, $date= '')
 
static titleAltAttrib ($content)
 
static getThumbNail ($thumbScript, $theFile, $tparams= '', $size= '')
 
static titleAttribForPages ($row, $perms_clause= '', $includeAttrib=true)
 
static getRecordToolTip (array $row, $table= 'pages')
 
static getRecordIconAltText ($row, $table= 'pages')
 
static getLabelFromItemlist ($table, $col, $key)
 
static getLabelFromItemListMerged ($pageId, $table, $column, $key)
 
static getLabelsFromItemsList ($table, $column, $keyList, array $columnTsConfig=array())
 
static getItemLabel ($table, $col, $printAllWrap= '')
 
static getRecordTitle ($table, $row, $prep=false, $forceResult=true)
 
static getRecordTitlePrep ($title, $titleLength=0)
 
static getNoRecordTitle ($prep=false)
 
static getProcessedValueExtra ($table, $fN, $fV, $fixed_lgd_chars=0, $uid=0, $forceResult=true, $pid=0)
 
static getCommonSelectFields ($table, $prefix= '', $fields=array())
 
static makeConfigForm ($configArray, $defaults, $dataPrefix)
 
static helpTextIcon ($table, $field, $_= '', $force=false)
 
static helpTextArray ($table, $field)
 
static cshItem ($table, $field, $_= '', $wrap= '')
 
static editOnClick ($params, $_= '', $requestUri= '')
 
static viewOnClick ($pageUid, $backPath= '', $rootLine=null, $anchorSection= '', $alternativeUrl= '', $additionalGetVars= '', $switchFocus=true)
 
static wrapClickMenuOnIcon ($content, $table, $uid=0, $listFrame=true, $addParams= '', $enDisItems= '', $returnTagParameters=false)
 
static getLinkToDataHandlerAction ($parameters, $redirectUrl= '')
 
static getModTSconfig ($id, $TSref)
 
static getFuncMenu ($mainParams, $elementName, $currentValue, $menuItems, $script= '', $addParams= '')
 
static getDropdownMenu ($mainParams, $elementName, $currentValue, $menuItems, $script= '', $addParams= '')
 
static getFuncCheck ($mainParams, $elementName, $currentValue, $script= '', $addParams= '', $tagParams= '')
 
static getFuncInput ($mainParams, $elementName, $currentValue, $size=10, $script= '', $addParams= '')
 
static unsetMenuItems ($modTSconfig, $itemArray, $TSref)
 
static setUpdateSignal ($set= '', $params= '')
 
static getUpdateSignalCode ()
 
static getModuleData ($MOD_MENU, $CHANGED_SETTINGS, $modName, $type= '', $dontValidateList= '', $setDefaultList= '')
 
static getUrlToken ($formName= 'securityToken', $tokenName= 'formToken')
 
static lockRecords ($table= '', $uid=0, $pid=0)
 
static isRecordLocked ($table, $uid)
 
static exec_foreign_table_where_query ($fieldConfig, $field= '', $TSconfig=array())
 
static replaceMarkersInWhereClause ($whereClause, $table, $field= '', $tsConfig=array())
 
static getTCEFORM_TSconfig ($table, $row)
 
static getTSconfig_pidValue ($table, $uid, $pid)
 
static getPidForModTSconfig ($table, $uid, $pid)
 
static getTSCpidCached ($table, $uid, $pid)
 
static getTSCpid ($table, $uid, $pid)
 
static firstDomainRecord ($rootLine)
 
static getDomainStartPage ($domain, $path= '')
 
static RTEsetup ($RTEprop, $table, $field, $type= '')
 
static RTEgetObj ()
 
static & softRefParserObj ($spKey)
 
static explodeSoftRefParserList ($parserList)
 
static isModuleSetInTBE_MODULES ($modName)
 
static referenceCount ($table, $ref, $msg= '', $count=null)
 
static translationCount ($table, $ref, $msg= '')
 
static selectVersionsOfRecord ($table, $uid, $fields= '*', $workspace=0, $includeDeletedRecords=false, $row=null)
 
static fixVersioningPid ($table, &$rr, $ignoreWorkspaceMatch=false)
 
static workspaceOL ($table, &$row, $wsid=-99, $unsetMovePointers=false)
 
static movePlhOL ($table, &$row)
 
static getWorkspaceVersionOfRecord ($workspace, $table, $uid, $fields= '*')
 
static getLiveVersionOfRecord ($table, $uid, $fields= '*')
 
static getLiveVersionIdOfRecord ($table, $uid)
 
static versioningPlaceholderClause ($table)
 
static getWorkspaceWhereClause ($table, $workspaceId=null)
 
static countVersionsOfRecordsOnPage ($workspace, $pageId)
 
static wsMapId ($table, $uid)
 
static getMovePlaceholder ($table, $uid, $fields= '*', $workspace=null)
 
static TYPO3_copyRightNotice ()
 
static getPathType_web_nonweb ($path)
 
static processParams ($params)
 
static getBackendScript ($interface= '')
 
static isTableWorkspaceEnabled ($table)
 
static isTableMovePlaceholderAware ($table)
 
static getTcaFieldConfiguration ($table, $field)
 
static isWebMountRestrictionIgnored ($table)
 
static isRootLevelRestrictionIgnored ($table)
 
static shortcutExists ($url)
 

Static Protected Member Functions

static getPageForRootline ($uid, $clause, $workspaceOL)
 
static getRecordsSortedByTitle (array $fields, $table, $titleField, $where= '')
 
static replaceL10nModeFields ($table, array $row)
 
static createPreviewUrl ($pageUid, $rootLine, $anchorSection, $additionalGetVars, $viewScript)
 
static buildScriptUrl ($mainParams, $addParams, $script= '')
 
static getRuntimeCache ()
 
static getSignalSlotDispatcher ()
 
static emitGetPagesTSconfigPreIncludeSignal (array $TSdataArray, $id, array $rootLine, $returnPartArray)
 
static getDatabaseConnection ()
 
static getLanguageService ()
 
static getBackendUserAuthentication ()
 
static getDocumentTemplate ()
 

Static Protected Attributes

static $tcaTableTypeConfigurationCache = array()
 

Detailed Description

Standard functions available for the TYPO3 backend. You are encouraged to use this class in your own applications (Backend Modules) Don't instantiate - call functions with "\TYPO3\CMS\Backend\Utility\BackendUtility::" prefixed the function name.

Call ALL methods without making an object! Eg. to get a page-record 51 do this: '::getRecord('pages',51)'

Definition at line 53 of file backend/Classes/Utility/BackendUtility.php.

Member Function Documentation

static BEenableFields (   $table,
  $inv = false 
)
static

Backend implementation of enableFields() Notice that "fe_groups" is not selected for - only disabled, starttime and endtime. Notice that deleted-fields are NOT filtered - you must ALSO call deleteClause in addition. $GLOBALS["SIM_ACCESS_TIME"] is used for date.

Parameters
string$tableThe table from which to return enableFields WHERE clause. Table name must have a 'ctrl' section in $GLOBALS['TCA'].
bool$invMeans that the query will select all records NOT VISIBLE records (inverted selection)
Returns
string WHERE clause part

Definition at line 266 of file backend/Classes/Utility/BackendUtility.php.

References $GLOBALS.

Referenced by Abbreviation\buildJSAbbreviationArray(), SchedulerModuleController\checkSchedulerUser(), CrawlerHook\crawler_execute_type1(), ImportExport\fetchStorageRecords(), DefaultAvatarProvider\getAvatarFileUid(), SetupModuleController\getAvatarFileUid(), Typo3DbQueryParser\getBackendConstraintStatement(), Typo3DbBackend\getBackendConstraintStatement(), DefaultDataProvider\getBackendLayout(), StagesService\getBackendUsers(), DataHandlerHook\getEmailsForStageChangeNotification(), BackendUserAuthentication\getFileMountRecords(), Language\getLanguages(), DefaultDataProvider\getLayoutData(), LinkAnalyzer\getLinkStatistics(), PageLayoutController\getNumberOfHiddenElements(), LinkHandler\getRecordRow(), SchedulerModuleController\getRegisteredTaskGroups(), LoginController\getSystemNews(), BrowseTreeView\getTitleStr(), BackendUserAuthentication\isUserAllowedToLogin(), PageLayoutController\makeQuickEditMenu(), PagePositionMap\printContentElementColumns(), and SetupModuleController\simulateUser().

static BEgetRootLine (   $uid,
  $clause = '',
  $workspaceOL = false 
)
static

Returns what is called the 'RootLine'. That is an array with information about the page records from a page id ($uid) and back to the root. By default deleted pages are filtered. This RootLine will follow the tree all the way to the root. This is opposite to another kind of root line known from the frontend where the rootline stops when a root-template is found.

Parameters
int$uidPage id for which to create the root line.
string$clauseClause can be used to select other criteria. It would typically be where-clauses that stops the process if we meet a page, the user has no reading access to.
bool$workspaceOLIf TRUE, version overlay is applied. This must be requested specifically because it is usually only wanted when the rootline is used for visual output while for permission checking you want the raw thing!
Returns
array Root line array, all the way to the page tree root (or as far as $clause allows!)

Definition at line 334 of file backend/Classes/Utility/BackendUtility.php.

Referenced by DatabasePageRootline\addData(), VersionModuleController\adminLinks(), ActionTask\checkRootline(), TreelistCacheUpdateHooks\clearCacheForAllParents(), ConditionMatcher\determineRootline(), ExtendedTemplateService\ext_prevPageWithTemplate(), EditDocumentController\generatePreviewCode(), InternalLinktype\getBrokenUrl(), InfoModuleController\getButtons(), PageFunctionsController\getButtons(), DatabaseRecordList\getButtons(), VersionModuleController\getButtons(), ImportExportController\getButtons(), NewRecordController\getButtons(), TypoScriptTemplateModuleController\getButtons(), DatabaseRecordList\getDocHeaderButtons(), ViewModuleController\getDomainName(), InfoPageTyposcriptConfigController\getOverviewOfPagesUsingTSConfig(), ElementInformationController\getRecordActions(), BackendLayoutView\getRootLine(), PermissionController\initializeView(), BackendUserAuthentication\isInWebMount(), PageLayoutController\main(), PageLayoutController\makeButtons(), and DocumentTemplate\viewPageIcon().

static blindGroupNames (   $groups,
  $groupArray,
  $excludeBlindedFlag = false 
)
static

Corresponds to blindUserNames but works for groups instead

Parameters
array$groupsGroup names
array$groupArrayGroup names (reference)
bool$excludeBlindedFlagIf $excludeBlindedFlag is set, then these records are unset from the array $usernames
Returns
array

Definition at line 1504 of file backend/Classes/Utility/BackendUtility.php.

References ArrayUtility\inArray().

static blindUserNames (   $usernames,
  $groupArray,
  $excludeBlindedFlag = false 
)
static

Returns the array $usernames with the names of all users NOT IN $groupArray changed to the uid (hides the usernames!). If $excludeBlindedFlag is set, then these records are unset from the array $usernames Takes $usernames (array made by ::getUserNames()) and a $groupArray (array with the groups a certain user is member of) as input

Parameters
array$usernamesUser names
array$groupArrayGroup names
bool$excludeBlindedFlagIf $excludeBlindedFlag is set, then these records are unset from the array $usernames
Returns
array User names, blinded

Definition at line 1470 of file backend/Classes/Utility/BackendUtility.php.

References GeneralUtility\inList().

static buildScriptUrl (   $mainParams,
  $addParams,
  $script = '' 
)
staticprotected

Builds the URL to the current script with given arguments

Parameters
mixed$mainParams$id is the "&id=" parameter value to be sent to the module, but it can be also a parameter array which will be passed instead of the &id=...
string$addParamsAdditional parameters to pass to the script.
string$scriptThe script to send the &id to, if empty it's automatically found
Returns
string The completes script URL

Definition at line 3297 of file backend/Classes/Utility/BackendUtility.php.

References elseif.

static calcAge (   $seconds,
  $labels = ' min| hrs| days| yrs| min| hour| day| year' 
)
static

Returns the "age" in minutes / hours / days / years of the number of $seconds inputted.

Parameters
int$secondsSeconds could be the difference of a certain timestamp and time()
string$labelsLabels should be something like ' min| hrs| days| yrs| min| hour| day| year'. This value is typically delivered by this function call: $GLOBALS["LANG"]->sL("LLL:EXT:lang/locallang_core.xlf:labels.minutesHoursDaysYears")
Returns
string Formatted time

Definition at line 1589 of file backend/Classes/Utility/BackendUtility.php.

References elseif.

Referenced by BackendUtilityTest\calcAgeReturnsExpectedValues(), NoneElement\formatValue(), RteController\getButtons(), EditDocumentController\getButtons(), TcaRecordTitle\getRecordTitleForInputType(), and PageLayoutController\makeButtons().

static countVersionsOfRecordsOnPage (   $workspace,
  $pageId 
)
static

Count number of versions on a page

Parameters
int$workspaceWorkspace ID
int$pageIdPage ID
Returns
array Overview of records
Deprecated:
since TYPO3 CMS 7. Will be removed with TYPO3 CMS 8. Please use ::hasPageRecordVersions to check for record versions.

Definition at line 4556 of file backend/Classes/Utility/BackendUtility.php.

static createPreviewUrl (   $pageUid,
  $rootLine,
  $anchorSection,
  $additionalGetVars,
  $viewScript 
)
staticprotected

Creates the view-on-click preview URL without any alternative URL.

Parameters
int$pageUidPage UID
array$rootLineIf rootline is supplied, the function will look for the first found domain record and use that URL instead
string$anchorSectionOptional anchor to the URL
string$additionalGetVarsAdditional GET variables.
string$viewScriptThe path to the script used to view the page
Returns
string The preview URL

Definition at line 3044 of file backend/Classes/Utility/BackendUtility.php.

static cshItem (   $table,
  $field,
  $_ = '',
  $wrap = '' 
)
static

API for getting CSH icons/text for use in backend modules. TCA_DESCR will be loaded if it isn't already

Parameters
string$tableTable name ('MOD'+module name)
string$fieldField name (CSH locallang main key)
string$_(unused)
string$wrapWrap code for icon-mode, splitted by "|". Not used for full-text mode.
Returns
string HTML content for help text
See Also
helpTextIcon()

Definition at line 2881 of file backend/Classes/Utility/BackendUtility.php.

Referenced by DatabaseRecordList\getButtons(), PageTreeNavigationController\getButtons(), NewRecordController\getButtons(), PageLayoutView\getTable_pages(), SortPagesWizardModuleFunction\main(), PageInformationController\main(), CreatePagesWizardModuleFunctionController\main(), TranslationStatusController\main(), InfoPageTyposcriptConfigController\main(), CreateFolderController\main(), ImportExportController\makeAdvancedOptionsForm(), ImportExportController\makeConfigurationForm(), ImportExportController\makeSaveForm(), HelpButton\render(), and CshViewHelper\renderStatic().

static date (   $tstamp)
static

Returns $tstamp formatted as "ddmmyy" (According to $GLOBALS['TYPO3_CONF_VARS']['SYS']['ddmmyy'])

Parameters
int$tstampTime stamp, seconds
Returns
string Formatted time

Definition at line 1546 of file backend/Classes/Utility/BackendUtility.php.

References $GLOBALS.

Referenced by BackendUtility\datetime(), FileController\flattenResultDataValue(), FileFacade\getLastModified(), and TcaRecordTitle\getRecordTitleForInputType().

static datetime (   $value)
static

Returns $tstamp formatted as "ddmmyy hhmm" (According to $GLOBALS['TYPO3_CONF_VARS']['SYS']['ddmmyy'] AND $GLOBALS['TYPO3_CONF_VARS']['SYS']['hhmm'])

Parameters
int$valueTime stamp, seconds
Returns
string Formatted time

Definition at line 1557 of file backend/Classes/Utility/BackendUtility.php.

References $GLOBALS, and BackendUtility\date().

Referenced by ExtDirectServer\getCommentsForRecord(), HistoryService\getHistoryEntry(), TcaRecordTitle\getRecordTitleForInputType(), SortPagesWizardModuleFunction\main(), ModuleController\printLogMgm(), DateTimeViewHelper\renderStatic(), and DeletedRecordsController\transform().

static dateTimeAge (   $tstamp,
  $prefix = 1,
  $date = '' 
)
static

Returns a formatted timestamp if $tstamp is set. The date/datetime will be followed by the age in parenthesis.

Parameters
int$tstampTime stamp, seconds
int$prefix1/-1 depending on polarity of age.
string$date$date=="date" will yield "dd:mm:yy" formatting, otherwise "dd:mm:yy hh:mm
Returns
string

Definition at line 1619 of file backend/Classes/Utility/BackendUtility.php.

References $GLOBALS.

Referenced by ActionTask\viewEditRecord().

static daysUntil (   $tstamp)
static

Returns the difference in days between input $tstamp and $EXEC_TIME

Parameters
int$tstampTime stamp, seconds
Returns
int

Definition at line 1534 of file backend/Classes/Utility/BackendUtility.php.

References $GLOBALS.

static deleteClause (   $table,
  $tableAlias = '' 
)
static

Returns the WHERE clause " AND NOT [tablename].[deleted-field]" if a deleted-field is configured in $GLOBALS['TCA'] for the tablename, $table This function should ALWAYS be called in the backend for selection on tables which are configured in $GLOBALS['TCA'] since it will ensure consistent selection of records, even if they are marked deleted (in which case the system must always treat them as non-existent!) In the frontend a function, ->enableFields(), is known to filter hidden-field, start- and endtime and fe_groups as well. But that is a job of the frontend, not the backend. If you need filtering on those fields as well in the backend you can use ->BEenableFields() though.

Parameters
string$tableTable name present in $GLOBALS['TCA']
string$tableAliasTable alias if any
Returns
string WHERE clause for filtering out deleted records, eg " AND tablename.deleted=0

Definition at line 82 of file backend/Classes/Utility/BackendUtility.php.

References $GLOBALS.

Referenced by DatabasePageLanguageOverlayRows\addData(), DataHandler\addDefaultPermittedLanguageIfNotSet(), AbstractExportTestCase\addRecordsForPid(), AutoPublishService\autoPublishWorkspaces(), WorkspacesUtility\autoPublishWorkspaces(), AbstractItemProvider\buildForeignTableQuery(), Abbreviation\buildJSAbbreviationArray(), SchedulerModuleController\checkSchedulerUser(), BackendUserAuthentication\checkWorkspace(), CrawlerHook\cleanUpOldRunningConfigurations(), DatabaseIntegrityCheck\countRecords(), CrawlerHook\crawler_execute_type1(), CrawlerHook\crawler_execute_type4(), CrawlerHook\crawler_init(), EditDocumentController\editRegularContentFromId(), PageLayoutController\exec_languageQuery(), PageLinkHandler\expandPage(), Bootstrap\expectOutput(), ImportExport\fetchStorageRecords(), RecordCollectionRepository\findByUid(), DataHandlerHook\findPageElementsForVersionStageChange(), DataHandlerHook\findPageElementsForVersionSwap(), DataHandlerHook\findPageIdsForVersionStateChange(), DataHandlerHook\flushWorkspaceElements(), AbstractDatabaseRecordList\generateList(), CleanerCommand\genTree(), DatabaseIntegrityCheck\genTree_records(), CleanerCommand\genTree_traverse(), FlexFormTools\getAvailableLanguages(), WorkspaceService\getAvailableWorkspaces(), DefaultAvatarProvider\getAvatarFileUid(), SetupModuleController\getAvatarFileUid(), Typo3DbQueryParser\getBackendConstraintStatement(), Typo3DbBackend\getBackendConstraintStatement(), DefaultDataProvider\getBackendLayout(), TranslationStatusController\getContentElementCount(), AbstractTreeView\getCount(), ActionTask\getCreatedUsers(), AbstractTreeView\getDataInit(), BackendUserAuthentication\getDefaultWorkspace(), PageLayoutController\getElementsFromColumnAndLanguage(), BackendUserAuthentication\getFileMountRecords(), TranslationStatusController\getLangStatus(), Language\getLanguages(), EditDocumentController\getLanguages(), DefaultDataProvider\getLayoutData(), PageLayoutController\getLocalizedPageTitle(), WorkspaceService\getMoveToPlaceHolderFromPages(), PageLayoutView\getNonTranslatedTTcontentUids(), PageLayoutController\getNumberOfHiddenElements(), InfoPageTyposcriptConfigController\getOverviewOfPagesUsingTSConfig(), ViewModuleController\getPreviewLanguages(), AdminPanelView\getPreviewModule(), AbstractDatabaseRecordProvider\getRecordFromDatabase(), LinkHandler\getRecordRow(), LocalizationController\getRecordsToCopyDatabaseResult(), SchedulerModuleController\getRegisteredTaskGroups(), QueryGenerator\getSelectQuery(), ShortcutToolbarItem\getShortcutIcon(), TranslationStatusController\getSystemLanguages(), LoginController\getSystemNews(), PageLayoutView\getTable_pages(), PageLayoutView\getTableMenu(), BrowseTreeView\getTitleStr(), QueryGenerator\getTreeList(), DataProvider\getWhereClause(), WorkspaceService\hasPageRecordVersions(), AbstractRecordList\initializeLanguages(), WorkspaceService\isNewPage(), EditDocumentController\languageSwitch(), CategoryCollection\load(), AbstractRecordCollection\load(), EditDocumentController\localizationRedirect(), VersionsCommand\main(), PageLayoutController\makeButtons(), QueryGenerator\makeOptionList(), AbstractDatabaseRecordList\makeQueryArray(), LiveSearch\makeQuerySearchByTable(), PageLayoutController\makeQuickEditMenu(), DataHandler\noRecordsFromUnallowedTables(), PageLayoutView\numberOfRecords(), VersionModuleController\pageSubContent(), PagePositionMap\printContentElementColumns(), CrawlerHook\processDatamap_afterDatabaseOperations(), QueryView\queryMaker(), RecordCollectionRepository\queryMultipleRecords(), RelationHandler\readForeignField(), DataHandlerHook\resetStageOfElements(), WorkspaceService\selectAllVersionsFromPages(), WorkspacesUtility\selectVersionsInWorkspace(), DatabaseIntegrityCheck\testDBRefs(), and TranslationConfigurationProvider\translationInfo().

static editOnClick (   $params,
  $_ = '',
  $requestUri = '' 
)
static

Returns a JavaScript string (for an onClick handler) which will load the EditDocumentController script that shows the form for editing of the record(s) you have send as params. REMEMBER to always htmlspecialchar() content in href-properties to ampersands get converted to entities (XHTML requirement and XSS precaution)

Parameters
string$paramsParameters sent along to EditDocumentController. This requires a much more details description which you must seek in Inside TYPO3s documentation of the FormEngine API. And example could be '&edit[pages][123] = edit' which will show edit form for page record 123.
string$_(unused)
string$requestUriAn optional returnUrl you can set - automatically set to REQUEST_URI.
Returns
string

Definition at line 2907 of file backend/Classes/Utility/BackendUtility.php.

Referenced by DatabaseRecordList\getButtons(), DatabaseRecordList\getDocHeaderButtons(), PageLayoutView\getTable_pages(), PageLayoutView\linkEditContent(), AbstractDatabaseRecordList\linkWrapItems(), PageLayoutController\makeButtons(), PageLayoutView\makeOrdinaryList(), PageLayoutView\newContentElementOnClick(), PagePositionMap\onClickEvent(), PageLayoutView\pages_drawItem(), TranslationStatusController\renderL10nTable(), DatabaseRecordList\renderListHeader(), PageLayoutView\tt_content_drawColHeader(), and PageLayoutView\tt_content_drawHeader().

static emitGetPagesTSconfigPreIncludeSignal ( array  $TSdataArray,
  $id,
array  $rootLine,
  $returnPartArray 
)
staticprotected

Emits signal to modify the page TSconfig before include

Parameters
array$TSdataArrayCurrent TSconfig data array - Can be modified by slots!
int$idPage ID we are handling
array$rootLineRootline array of page
bool$returnPartArrayWhether TSdata should be parsed by TS parser or returned as plain text
Returns
array Modified Data array

Definition at line 4880 of file backend/Classes/Utility/BackendUtility.php.

static exec_foreign_table_where_query (   $fieldConfig,
  $field = '',
  $TSconfig = array() 
)
static

Returns select statement for MM relations (as used by TCEFORMs etc)

Parameters
array$fieldConfigConfiguration array for the field, taken from $GLOBALS['TCA']
string$fieldField name
array$TSconfigTSconfig array from which to get further configuration settings for the field name
Returns
string Part of query

Definition at line 3683 of file backend/Classes/Utility/BackendUtility.php.

static explodeSoftRefParserList (   $parserList)
static

Returns array of soft parser references

Parameters
string$parserListsoftRef parser list
Returns
array|bool Array where the parser key is the key and the value is the parameter string, FALSE if no parsers were found

Definition at line 4101 of file backend/Classes/Utility/BackendUtility.php.

Referenced by ReferenceIndex\getRelations(), and ReferenceIndex\getRelations_flexFormCallBack().

static firstDomainRecord (   $rootLine)
static

Returns first found domain record "domainName" (without trailing slash) if found in the input $rootLine

Parameters
array$rootLineRoot line array
Returns
string|NULL Domain name or NULL

Definition at line 3953 of file backend/Classes/Utility/BackendUtility.php.

Referenced by InternalLinktype\getBrokenUrl(), and ViewModuleController\getDomainName().

static fixVersioningPid (   $table,
$rr,
  $ignoreWorkspaceMatch = false 
)
static

Find page-tree PID for versionized record Will look if the "pid" value of the input record is -1 and if the table supports versioning - if so, it will translate the -1 PID into the PID of the original record Used whenever you are tracking something back, like making the root line. Will only translate if the workspace of the input record matches that of the current user (unless flag set) Principle; Record offline! => Find online?

If the record had its pid corrected to the online versions pid, then "_ORIG_pid" is set to the original pid value (-1 of course). The field "_ORIG_pid" is used by various other functions to detect if a record was in fact in a versionized branch.

Parameters
string$tableTable name
array$rrRecord array passed by reference. As minimum, "pid" and "uid" fields must exist! "t3ver_oid" and "t3ver_wsid" is nice and will save you a DB query.
bool$ignoreWorkspaceMatchIgnore workspace match
Returns
void
See Also
PageRepository::fixVersioningPid()

Definition at line 4291 of file backend/Classes/Utility/BackendUtility.php.

Referenced by DatabaseEditRow\addData(), RecyclerUtility\checkAccess(), AbstractWizardController\checkEditAccess(), DataHandler\destNotInsideSelf(), DataHandler\doesRecordExist(), DataHandler\fillInFieldArray(), RecyclerUtility\getRecordPath(), DataHandler\getRecordPropertiesFromRow(), RichTextElement\render(), and RichTextNodeResolver\resolve().

static getBackendScript (   $interface = '')
static

Returns the name of the backend script relative to the TYPO3 main directory.

Parameters
string$interfaceName of the backend interface (backend, frontend) to look up the script name for. If no interface is given, the interface for the current backend user is used.
Returns
string The name of the backend script relative to the TYPO3 main directory.

Definition at line 4750 of file backend/Classes/Utility/BackendUtility.php.

Referenced by AdminPanelView\getEditModule().

static getBackendUserAuthentication ( )
staticprotected
Returns
BackendUserAuthentication

Definition at line 4905 of file backend/Classes/Utility/BackendUtility.php.

static getCommonSelectFields (   $table,
  $prefix = '',
  $fields = array() 
)
static

Returns fields for a table, $table, which would typically be interesting to select This includes uid, the fields defined for title, icon-field. Returned as a list ready for query ($prefix can be set to eg. "pages." if you are selecting from the pages table and want the table name prefixed)

Parameters
string$tableTable name, present in $GLOBALS['TCA']
string$prefixTable prefix
array$fieldsPreset fields (must include prefix if that is used)
Returns
string List of fields.

Definition at line 2620 of file backend/Classes/Utility/BackendUtility.php.

Referenced by AbstractItemProvider\buildForeignTableQuery(), DatabaseIntegrityCheck\genTree_records(), and BackendUtilityTest\getCommonSelectFieldsReturnsCorrectFields().

static getDatabaseConnection ( )
staticprotected
Returns
DatabaseConnection

Definition at line 4889 of file backend/Classes/Utility/BackendUtility.php.

static getDocumentTemplate ( )
staticprotected
Returns
DocumentTemplate

Definition at line 4913 of file backend/Classes/Utility/BackendUtility.php.

static getDomainStartPage (   $domain,
  $path = '' 
)
static

Returns the sys_domain record for $domain, optionally with $path appended.

Parameters
string$domainDomain name
string$pathAppended path
Returns
array Domain record, if found

Definition at line 3972 of file backend/Classes/Utility/BackendUtility.php.

static getDropdownMenu (   $mainParams,
  $elementName,
  $currentValue,
  $menuItems,
  $script = '',
  $addParams = '' 
)
static

Returns a selector box to switch the view Requires the JS function jumpToUrl() to be available Based on BackendUtility::getFuncMenu() but done as new function because it has another purpose. Mingling with getFuncMenu would harm the docHeader Menu.

Parameters
mixed$mainParamsThe "&id=" parameter value to be sent to the module, but it can be also a parameter array which will be passed instead of the &id=...
string$elementNameThe form elements name, probably something like "SET[...]
string$currentValueThe value to be selected currently.
array$menuItemsAn array with the menu items for the selector box
string$scriptThe script to send the &id to, if empty it's automatically found
string$addParamsAdditional parameters to pass to the script.
Returns
string HTML code for selector box

Definition at line 3215 of file backend/Classes/Utility/BackendUtility.php.

Referenced by DatabaseIntegrityView\func_search(), PageInformationController\main(), TranslationStatusController\main(), InfoPageTyposcriptConfigController\main(), TypoScriptTemplateConstantEditorModuleFunctionController\main(), and TypoScriptTemplateObjectBrowserModuleFunctionController\main().

static getExcludeFields ( )
static

Returns an array with the exclude-fields as defined in TCA and FlexForms Used for listing the exclude-fields in be_groups forms

Returns
array Array of arrays with excludeFields (fieldname, table:fieldname) from all TCA entries and from FlexForms (fieldname, table:extkey;sheetname;fieldname)
Deprecated:
since TYPO3 CMS 7, will be removed in TYPO3 CMS 8

Definition at line 504 of file backend/Classes/Utility/BackendUtility.php.

References $extConf, $GLOBALS, $lang, and GeneralUtility\logDeprecatedFunction().

static getExplicitAuthFieldValues ( )
static

Returns an array with explicit Allow/Deny fields. Used for listing these field/value pairs in be_groups forms

Returns
array Array with information from all of $GLOBALS['TCA']
Deprecated:
since TYPO3 CMS 7, will be removed in TYPO3 CMS 8

Definition at line 587 of file backend/Classes/Utility/BackendUtility.php.

References $GLOBALS, $lang, elseif, and GeneralUtility\logDeprecatedFunction().

static getFlexFormDS (   $conf,
  $row,
  $table,
  $fieldName = '',
  $WSOL = true,
  $newRecordPidValue = 0 
)
static

Finds the Data Structure for a FlexForm field

NOTE ON data structures for deleted records: This function may fail to deliver the data structure for a record for a few reasons: a) The data structure could be deleted (either with deleted-flagged or hard-deleted), b) the data structure is fetched using the ds_pointerField_searchParent in which case any deleted record on the route to the final location of the DS will make it fail. In theory, we can solve the problem in the case where records that are deleted-flagged keeps us from finding the DS - this is done at the markers ###NOTE_A### where we make sure to also select deleted records. However, we generally want the DS lookup to fail for deleted records since for the working website we expect a deleted-flagged record to be as inaccessible as one that is completely deleted from the DB. Any way we look at it, this may lead to integrity problems of the reference index and even lost files if attached. However, that is not really important considering that a single change to a data structure can instantly invalidate large amounts of the reference index which we do accept as a cost for the flexform features. Other than requiring a reference index update, deletion of/changes in data structure or the failure to look them up when completely deleting records may lead to lost files in the uploads/ folders since those are now without a proper reference.

Parameters
array$confField config array
array$rowRecord data
string$tableThe table name
string$fieldNameOptional fieldname passed to hook object
bool$WSOLIf set, workspace overlay is applied to records. This is correct behaviour for all presentation and export, but NOT if you want a TRUE reflection of how things are in the live workspace.
int$newRecordPidValueSPECIAL CASES: Use this, if the DataStructure may come from a parent record and the INPUT row doesn't have a uid yet (hence, the pid cannot be looked up). Then it is necessary to supply a PID value to search recursively in for the DS (used from TCEmain)
Returns
mixed If array, the data structure was found and returned as an array. Otherwise (string) it is an error message.
Todo:
: All those nasty details should be covered with tests, also it is very unfortunate the final $srcPointer is not exposed

Definition at line 993 of file backend/Classes/Utility/BackendUtility.php.

References $GLOBALS, MathUtility\canBeInterpretedAsInteger(), elseif, GeneralUtility\getFileAbsFileName(), GeneralUtility\getUrl(), GeneralUtility\getUserObj(), GeneralUtility\trimExplode(), and GeneralUtility\xml2array().

Referenced by DataHandler\checkValueForFlex(), DataHandler\copyRecord_procBasedOnFieldType(), TcaFlexFetch\initializeDataStructure(), SuggestWizard\overrideFieldNameAndConfigurationForFlexform(), DataHandler\remapListedDBRecords(), ImportExport\setFlexFormRelations(), and FlexFormTools\traverseFlexFormXMLData().

static getFuncCheck (   $mainParams,
  $elementName,
  $currentValue,
  $script = '',
  $addParams = '',
  $tagParams = '' 
)
static

Checkbox function menu. Works like ->getFuncMenu() but takes no $menuItem array since this is a simple checkbox.

Parameters
mixed$mainParams$id is the "&id=" parameter value to be sent to the module, but it can be also a parameter array which will be passed instead of the &id=...
string$elementNameThe form elements name, probably something like "SET[...]
string$currentValueThe value to be selected currently.
string$scriptThe script to send the &id to, if empty it's automatically found
string$addParamsAdditional parameters to pass to the script.
string$tagParamsAdditional attributes for the checkbox input tag
Returns
string HTML code for checkbox
See Also
getFuncMenu()

Definition at line 3252 of file backend/Classes/Utility/BackendUtility.php.

Referenced by DatabaseIntegrityView\func_search(), FileBrowser\getBulkSelector(), BackendUtilityTest\getFuncCheckReturnsInputTagWithValueAttribute(), InfoPageTyposcriptConfigController\main(), TemplateAnalyzerModuleFunctionController\main(), TypoScriptTemplateInformationModuleFunctionController\main(), TypoScriptTemplateObjectBrowserModuleFunctionController\main(), and QueryGenerator\makeSelectorTable().

static getFuncInput (   $mainParams,
  $elementName,
  $currentValue,
  $size = 10,
  $script = '',
  $addParams = '' 
)
static

Input field function menu Works like ->getFuncMenu() / ->getFuncCheck() but displays an input field instead which updates the script "onchange"

Parameters
mixed$mainParams$id is the "&id=" parameter value to be sent to the module, but it can be also a parameter array which will be passed instead of the &id=...
string$elementNameThe form elements name, probably something like "SET[...]
string$currentValueThe value to be selected currently.
int$sizeRelative size of input field, max is 48
string$scriptThe script to send the &id to, if empty it's automatically found
string$addParamsAdditional parameters to pass to the script.
Returns
string HTML code for input text field.
See Also
getFuncMenu()

Definition at line 3282 of file backend/Classes/Utility/BackendUtility.php.

static getFuncMenu (   $mainParams,
  $elementName,
  $currentValue,
  $menuItems,
  $script = '',
  $addParams = '' 
)
static

Returns a selector box "function menu" for a module Requires the JS function jumpToUrl() to be available See Inside TYPO3 for details about how to use / make Function menus

Parameters
mixed$mainParamsThe "&id=" parameter value to be sent to the module, but it can be also a parameter array which will be passed instead of the &id=...
string$elementNameThe form elements name, probably something like "SET[...]
string$currentValueThe value to be selected currently.
array$menuItemsAn array with the menu items for the selector box
string$scriptThe script to send the &id to, if empty it's automatically found
string$addParamsAdditional parameters to pass to the script.
Returns
string HTML code for selector box

Definition at line 3177 of file backend/Classes/Utility/BackendUtility.php.

Referenced by VersionModuleController\main().

static getGroupNames (   $fields = 'title,
uid'  ,
  $where = '' 
)
static

Returns an array with be_groups records (title, uid) of all groups NOT DELETED sorted by their title

Parameters
string$fieldsField list
string$whereWHERE clause
Returns
array

Definition at line 1398 of file backend/Classes/Utility/BackendUtility.php.

References GeneralUtility\trimExplode().

Referenced by PermissionAjaxController\renderGroupSelector().

static getInlineLocalizationMode (   $table,
  $fieldOrConfig 
)
static

Returns the value of the property localizationMode in the given $config array ($GLOBALS['TCA'][

['columns'][<field>]['config']). If the table is prepared for localization and no localizationMode is set, 'select' is returned by default. If the table is not prepared for localization or not defined at all in $GLOBALS['TCA'], FALSE is returned.

Parameters
string$tableThe name of the table to lookup in TCA
mixed$fieldOrConfigThe fieldname (string) or the configuration of the field to check (array)
Returns
mixed If table is localizable, the set localizationMode is returned (if property is not set, 'select' is returned by default); if table is not localizable, FALSE is returned

Definition at line 715 of file backend/Classes/Utility/BackendUtility.php.

References $GLOBALS, and elseif.

Referenced by DataHandler\copyRecord_procBasedOnFieldType(), InlineStackProcessor\initializeByParsingDomObjectIdString(), and InlineStackProcessor\injectAjaxConfiguration().

static getItemLabel (   $table,
  $col,
  $printAllWrap = '' 
)
static

Returns the label-value for fieldname $col in table, $table If $printAllWrap is set (to a "wrap") then it's wrapped around the $col value IF THE COLUMN $col DID NOT EXIST in TCA!, eg. $printAllWrap = '|' and the fieldname was 'not_found_field' then the return value would be 'not_found_field'

Parameters
string$tableTable name, present in $GLOBALS['TCA']
string$colField name
string$printAllWrapWrap value - set function description - this parameter is deprecated since TYPO3 6.2 and is removed two versions later. This parameter is a conceptual failure, as the content can then never be HSCed afterwards (which is how the method is used all the time), and then the code would be HSCed twice.
Returns
string or NULL if $col is not found in the TCA table

Definition at line 2117 of file backend/Classes/Utility/BackendUtility.php.

Referenced by DataHandler\checkValueForCheck(), HistoryService\getDifferences(), PageLayoutView\getTable_pages(), RecordHistory\renderDiff(), ElementInformationController\renderFileInformationAsTable(), and DatabaseRecordList\renderListHeader().

static getLabelFromItemlist (   $table,
  $col,
  $key 
)
static

Returns the label of the first found entry in an "items" array from $GLOBALS'TCA' where the value is $key

Parameters
string$tableTable name, present in $GLOBALS['TCA']
string$colField name, present in $GLOBALS['TCA']
string$keyitems-array value to match
Returns
string Label for item entry

Definition at line 2013 of file backend/Classes/Utility/BackendUtility.php.

Referenced by BackendUtilityTest\getLabelFromItemlistReturnsCorrectFields(), PageLayoutController\makeQuickEditMenu(), and PagePositionMap\printRecordMap().

static getLabelFromItemListMerged (   $pageId,
  $table,
  $column,
  $key 
)
static

Return the label of a field by additionally checking TsConfig values

Parameters
int$pageIdPage id
string$tableTable name
string$columnField Name
string$keyitem value
Returns
string Label for item entry

Definition at line 2037 of file backend/Classes/Utility/BackendUtility.php.

References elseif.

Referenced by BackendUtilityTest\getLabelFromItemListMergedReturnsCorrectFields().

static getLabelsFromItemsList (   $table,
  $column,
  $keyList,
array  $columnTsConfig = array() 
)
static

Splits the given key with commas and returns the list of all the localized items labels, separated by a comma. NOTE: this does not take itemsProcFunc into account

Parameters
string$tableTable name, present in TCA
string$columnField name
string$keyListKey or comma-separated list of keys.
array$columnTsConfigpage TSConfig for $column (TCEMAIN.
<column>)
Returns
string Comma-separated list of localized labels

Definition at line 2067 of file backend/Classes/Utility/BackendUtility.php.

References elseif.

Referenced by BackendUtilityTest\getLabelsFromItemsListReturnsCorrectValue().

static getLanguageService ( )
staticprotected
Returns
LanguageService

Definition at line 4897 of file backend/Classes/Utility/BackendUtility.php.

static getLinkToDataHandlerAction (   $parameters,
  $redirectUrl = '' 
)
static

Returns a URL with a command to TYPO3 Datahandler

Parameters
string$parametersSet of GET params to send. Example: "&cmd[tt_content][123][move]=456" or "&data[tt_content][123][hidden]=1&data[tt_content][123][title]=Hello%20World
string | int$redirectUrlRedirect URL, default is to use GeneralUtility::getIndpEnv('REQUEST_URI'), -1 means to generate an URL for JavaScript using T3_THIS_LOCATION
Returns
string URL to BackendUtility::getModuleUrl('tce_db') + parameters

Definition at line 3017 of file backend/Classes/Utility/BackendUtility.php.

References $url.

Referenced by VersionModuleController\adminLinks(), DocumentTemplate\issueCommand(), EditDocumentController\languageSwitch(), PageLayoutView\tt_content_drawHeader(), and VersionModuleController\versioningMgm().

static getListGroupNames (   $fields = 'title,
uid'   
)
static

Returns an array with be_groups records (like ->getGroupNames) but:

  • if the current BE_USER is admin, then all groups are returned, otherwise only groups that the current user is member of (usergroup_cached_list) will be returned.
Parameters
string$fieldsField list; $fields specify the fields selected (default: title,uid)
Returns
array

Definition at line 1450 of file backend/Classes/Utility/BackendUtility.php.

Referenced by PermissionController\editAction().

static getLiveVersionIdOfRecord (   $table,
  $uid 
)
static

Gets the id of the live version of a record.

Parameters
string$tableName of the table
int$uidUid of the offline/draft record
Returns
int The id of the live version of the record (or NULL if nothing was found)

Definition at line 4499 of file backend/Classes/Utility/BackendUtility.php.

Referenced by TcaInline\addInlineFirstPid(), TcaInline\getLiveDefaultId(), RelationHandler\getLiveDefaultId(), DataHandler\remapListedDBRecords_procDBRefs(), and WorkspaceService\viewSingleRecord().

static getLiveVersionOfRecord (   $table,
  $uid,
  $fields = '*' 
)
static

Returns live version of record

Parameters
string$tableTable name
int$uidRecord UID of draft, offline version
string$fieldsField list, default is *
Returns
array|NULL If found, the record, otherwise NULL

Definition at line 4483 of file backend/Classes/Utility/BackendUtility.php.

Referenced by DataHandler\getSortNumber(), AddController\init(), EditDocumentController\languageSwitch(), DataHandler\moveRecord(), DataHandler\placeholderShadowing(), DataHandlerHook\processCmdmap_deleteAction(), DataHandler\resolvePid(), DataHandlerHook\version_clearWSID(), and WorkspaceService\viewSingleRecord().

static getModTSconfig (   $id,
  $TSref 
)
static
static getModuleData (   $MOD_MENU,
  $CHANGED_SETTINGS,
  $modName,
  $type = '',
  $dontValidateList = '',
  $setDefaultList = '' 
)
static

Returns an array which is most backend modules becomes MOD_SETTINGS containing values from function menus etc. determining the function of the module. This is kind of session variable management framework for the backend users. If a key from MOD_MENU is set in the CHANGED_SETTINGS array (eg. a value is passed to the script from the outside), this value is put into the settings-array Ultimately, see Inside TYPO3 for how to use this function in relation to your modules.

Parameters
array$MOD_MENUMOD_MENU is an array that defines the options in menus.
array$CHANGED_SETTINGSCHANGED_SETTINGS represents the array used when passing values to the script from the menus.
string$modNamemodName is the name of this module. Used to get the correct module data.
string$typeIf type is 'ses' then the data is stored as session-lasting data. This means that it'll be wiped out the next time the user logs in.
string$dontValidateListdontValidateList can be used to list variables that should not be checked if their value is found in the MOD_MENU array. Used for dynamically generated menus.
string$setDefaultListList of default values from $MOD_MENU to set in the output array (only if the values from MOD_MENU are not arrays)
Returns
array The array $settings, which holds a key for each MOD_MENU key and the values of each key will be within the range of values for each menuitem

Definition at line 3440 of file backend/Classes/Utility/BackendUtility.php.

Referenced by AbstractFunctionModule\checkExtObj(), BaseScriptClass\checkExtObj(), FileBrowser\getBulkSelector(), AbstractFunctionModule\handleExternalFunctionValue(), ModuleController\main(), TypoScriptTemplateConstantEditorModuleFunctionController\main(), ConfigurationView\menuConfig(), DatabaseIntegrityView\menuConfig(), VersionModuleController\menuConfig(), BaseScriptClass\menuConfig(), RecordList\menuConfig(), FileListController\menuConfig(), PageLayoutController\menuConfig(), and QueryView\procesStoreControl().

static getMovePlaceholder (   $table,
  $uid,
  $fields = '*',
  $workspace = null 
)
static

Returns move placeholder of online (live) version

Parameters
string$tableTable name
int$uidRecord UID of online version
string$fieldsField list, default is *
int | NULL$workspaceThe workspace to be used
Returns
array If found, the record, otherwise nothing.

Definition at line 4619 of file backend/Classes/Utility/BackendUtility.php.

Referenced by DataHandler\deleteVersionsForRecord(), DataHandler\getSortNumber(), DataHandlerHook\moveRecord(), DataHandlerHook\moveRecord_wsPlaceholders(), DataHandlerHook\processCmdmap_deleteAction(), DataHandlerHook\version_clearWSID(), and WorkspaceService\viewSingleRecord().

static getNoRecordTitle (   $prep = false)
static

Get a localized [No title] string, wrapped in | if $prep is TRUE.

Parameters
bool$prepWrap result in |
Returns
string Localized [No title] string

Definition at line 2258 of file backend/Classes/Utility/BackendUtility.php.

Referenced by FormResultCompiler\JSbottom().

static getOriginalTranslationTable (   $table)
static

Gets the original translation pointer table. For e.g. pages_language_overlay this would be pages.

Parameters
string$tableName of the table
Returns
string Pointer table (if any)

Definition at line 681 of file backend/Classes/Utility/BackendUtility.php.

References $GLOBALS.

static getPageForRootline (   $uid,
  $clause,
  $workspaceOL 
)
staticprotected

Gets the cached page record for the rootline

Parameters
int$uidPage id for which to create the root line.
string$clauseClause can be used to select other criteria. It would typically be where-clauses that stops the process if we meet a page, the user has no reading access to.
bool$workspaceOLIf TRUE, version overlay is applied. This must be requested specifically because it is usually only wanted when the rootline is used for visual output while for permission checking you want the raw thing!
Returns
array Cached page record for the rootline
See Also
BEgetRootLine

Definition at line 393 of file backend/Classes/Utility/BackendUtility.php.

static getPagesTSconfig (   $id,
  $rootLine = null,
  $returnPartArray = false 
)
static

Returns the Page TSconfig for page with id, $id

Parameters
int$idPage uid for which to create Page TSconfig
array$rootLineIf $rootLine is an array, that is used as rootline, otherwise rootline is just calculated
bool$returnPartArrayIf $returnPartArray is set, then the array with accumulated Page TSconfig is returned non-parsed. Otherwise the output will be parsed by the TypoScript parser.
Returns
array Page TSconfig
See Also

Definition at line 1261 of file backend/Classes/Utility/BackendUtility.php.

References $GLOBALS, StringUtility\beginsWith(), TypoScriptParser\checkIncludeLines_array(), ExtensionManagementUtility\extPath(), GeneralUtility\getUrl(), ExtensionManagementUtility\isLoaded(), GeneralUtility\makeInstance(), ArrayUtility\mergeRecursiveWithOverrule(), and GeneralUtility\trimExplode().

Referenced by BackendLayoutView\addBackendLayoutItems(), PageTsConfig\addData(), DataHandler\checkValue_flex_procInData_travDS(), Typo3DbBackend\clearPageCache(), DataHandler\fillInFieldArray(), PageTsBackendLayoutDataProvider\generatePageTsConfig(), EditDocumentController\generatePreviewCode(), NewRecordController\getButtons(), EditDocumentController\getButtons(), ViewModuleController\getDomainName(), AbstractLinkBrowserController\getLinkHandlers(), DataHandler\getTCEMAIN_TSconfig(), NewContentElementController\init(), BrowseLinksController\initVariables(), CreatePagesWizardModuleFunctionController\main(), InfoPageTyposcriptConfigController\main(), ParseHtmlController\main_parse_html(), UserElementsController\main_user(), NewRecordController\regularNew(), RichTextElement\render(), RichTextNodeResolver\resolve(), SuggestWizard\searchAction(), and WorkspaceService\viewSingleRecord().

static getPathType_web_nonweb (   $path)
static

Returns "web" if the $path (absolute) is within the DOCUMENT ROOT - and thereby qualifies as a "web" folder.

Parameters
string$pathPath to evaluate
Returns
bool
Deprecated:
since TYPO3 CMS 7, will be removed in TYPO3 CMS 8

Definition at line 4685 of file backend/Classes/Utility/BackendUtility.php.

static getPidForModTSconfig (   $table,
  $uid,
  $pid 
)
static

Return $uid if $table is pages and $uid is int - otherwise the $pid

Parameters
string$tableTable name
int$uidRecord uid
int$pidRecord pid
Returns
int

Definition at line 3894 of file backend/Classes/Utility/BackendUtility.php.

static getProcessedValueExtra (   $table,
  $fN,
  $fV,
  $fixed_lgd_chars = 0,
  $uid = 0,
  $forceResult = true,
  $pid = 0 
)
static

Same as ->getProcessedValue() but will go easy on fields like "tstamp" and "pid" which are not configured in TCA - they will be formatted by this function instead.

Parameters
string$tableTable name, present in TCA
string$fNField name
string$fVField value
int$fixed_lgd_charsThe max amount of characters the value may occupy
int$uidUid of the current record
bool$forceResultIf BackendUtility::getRecordTitle is used to process the value, this parameter is forwarded.
int$pidOptional page uid is used to evaluate page TSConfig for the given field
Returns
string
See Also
getProcessedValue()

Definition at line 2592 of file backend/Classes/Utility/BackendUtility.php.

References elseif.

Referenced by DatabaseRecordList\renderListRow().

static getRecord (   $table,
  $uid,
  $fields = '*',
  $where = '',
  $useDeleteClause = true 
)
static

Gets record with uid = $uid from $table You can set $field to a list of fields (default is '*') Additional WHERE clauses can be added by $where (fx. ' AND blabla = 1') Will automatically check if records has been deleted and if so, not return anything. $table must be found in $GLOBALS['TCA']

Parameters
string$tableTable name present in $GLOBALS['TCA']
int$uidUID of record
string$fieldsList of fields to select
string$whereAdditional WHERE clause, eg. " AND blablabla = 0
bool$useDeleteClauseUse the deleteClause to check if a record is deleted (default TRUE)
Returns
array|NULL Returns the row if found, otherwise NULL

Definition at line 105 of file backend/Classes/Utility/BackendUtility.php.

References $GLOBALS.

Referenced by DatabaseRecordTypeValue\addData(), TcaInline\addInlineFirstPid(), CommandMap\applyWorkspacesSetStageBehaviour(), ValidatorTask\buildMail(), WorkspaceService\canCreatePreviewLink(), RecyclerUtility\checkAccess(), AbstractWizardController\checkEditAccess(), IntegrityService\checkLocalization(), FileMetadataPermissionsAspect\checkModifyAccessList(), PagePositionMap\checkNewPageInPid(), FileMetadataPermissionsAspect\checkRecordUpdateAccess(), ExportTest\compileExportGroupFileAndFileReferenceItem(), ExportTest\compileExportPagesAndRelatedTtContentWithImages(), CrawlerHook\crawler_execute_type4(), ElementEntityProcessor\createClearDependentElementChildReferenceCallback(), ElementEntityProcessor\createClearDependentElementParentReferenceCallback(), ShortcutToolbarItem\createShortcutAction(), DataHandler\deleteAction(), DataHandler\deleteRecord_procFields(), ActionHandler\deleteSingleRecord(), ImportExport\export_addDBRelations(), ExportTest\exportGroupFileAndFileReferenceItem(), ExportTest\exportIrreRecords(), ExportTest\exportPagesAndRelatedTtContent(), ExportTest\exportPagesAndRelatedTtContentWithRteImagesAndFileLink(), LiveSearch\findPageById(), DataHandlerHook\findPageElementsForVersionSwap(), DataHandlerHook\findPageIdsForVersionStateChange(), DataHandlerHook\findRealPageIds(), ActionTask\fixDbMount(), PageLayoutView\generateListForCTypeMenu(), EditDocumentController\generatePreviewCode(), ValidatorTask\getAdditionalInformation(), FlexFormTools\getAvailableLanguages(), WorkspacesUtility\getCmdArrayForPublishWS(), WorkspaceService\getCmdArrayForPublishWS(), ExtDirectServer\getCommentsForRecord(), LinkBrowserController\getCurrentPageId(), LiveSearch\getEditLink(), DataHandlerHook\getEmailsForStageChangeNotification(), PageLayoutController\getHeaderFlashMessagesForCurrentPid(), AbstractTreeView\getIcon(), UserFileInlineLabelService\getInlineLabel(), WorkspaceService\getLivePageUid(), StagesService\getNotificationMode(), ConditionMatcher\getPage(), DataHandler\getPreviousLocalizedRecordUid(), StagesService\getPropertyOfCurrentWorkspaceStage(), ActionHandler\getRecipientList(), RecordHistory\getRecord(), EditDocumentController\getRecordForEdit(), StagesService\getStageRecord(), TranslationConfigurationProvider\getSystemLanguages(), ActionTask\getTask(), ActionTask\getUsergroups(), WorkspaceService\getWorkspaceTitle(), AddController\init(), NewRecordController\init(), ShortcutToolbarItem\initShortcuts(), FileMetadataPermissionsAspect\isAllowedToShowEditForm(), ActionTask\isCreatedByUser(), BackendUserAuthentication\isInWebMount(), WorkspaceService\isNewPage(), ConditionMatcher\isNewPageWithPageId(), WorkspaceService\isPageAccessibleForCurrentUser(), DataHandler\isRecordUndeletable(), EditDocumentController\languageSwitch(), AbstractDatabaseRecordList\linkWrapItems(), SortPagesWizardModuleFunction\main(), CreatePagesWizardModuleFunctionController\main(), ListController\main(), MoveElementController\main(), LinkValidatorReport\main(), VersionModuleController\main(), ElementInformationController\makeRef(), ElementInformationController\makeRefFrom(), ImportExport\migrateLegacyImportRecords(), DataHandlerHook\moveRecord_wsPlaceholders(), DataHandler\placeholderShadowing(), ClickMenu\printDBClickMenu(), ClickMenu\printFileClickMenu(), ClickMenu\printNewDBLevel(), TreelistCacheUpdateHooks\processCmdmap_postProcess(), TreelistCacheUpdateHooks\processDatamap_afterDatabaseOperations(), CrawlerHook\processDatamap_afterDatabaseOperations(), ImportExport\processSoftReferences_substTokens(), QueryView\procesStoreControl(), BackendUserAuthentication\recordEditAccessInternals(), AdministrationRepository\saveKeywords(), ActionTask\saveNewBackendUser(), SuggestWizard\searchAction(), ActionHandler\sendToNextStageExecute(), ActionHandler\sendToNextStageWindow(), ActionHandler\sendToPrevStageExecute(), ActionHandler\sendToPrevStageWindow(), ActionHandler\sendToSpecificStageExecute(), ActionHandlerTest\sendToSpecificStageExecuteIgnoresDoublePublishes(), ImportExport\setFlexFormRelations(), ElementHistoryController\setPagePath(), BackendLayoutWizardController\setPagePath(), AdministrationController\statisticDetailsAction(), ActionHandler\swapSingleRecord(), AjaxController\switchWorkspaceAction(), TableController\tableWizard(), DeletedRecordsController\transform(), RteHtmlParser\TS_links_rte(), DataHandlerHook\version_clearWSID(), DataHandlerHook\version_setStage(), VersionModuleController\versioningMgm(), ActionTask\viewEditRecord(), ActionTask\viewNewBackendUser(), WorkspaceService\viewSingleRecord(), BackendUserAuthentication\workspaceCannotEditOfflineVersion(), BackendUserAuthentication\workspaceCannotEditRecord(), BackendUserAuthentication\workspaceCheckStageForCurrent(), and RelationHandler\writeForeignField().

static getRecordIconAltText (   $row,
  $table = 'pages' 
)
static

Returns title-attribute information for ANY record (from a table defined in TCA of course) The included information depends on features of the table, but if hidden, starttime, endtime and fe_group fields are configured for, information about the record status in regard to these features are is included. "pages" table can be used as well and will return the result of ->titleAttribForPages() for that page.

Parameters
array$rowTable row; $row is a row from the table, $table
string$tableTable name
Returns
string

Definition at line 1954 of file backend/Classes/Utility/BackendUtility.php.

References $lang.

Referenced by DocumentTemplate\getPageInfo(), PagePositionMap\getRecordHeader(), and InlineRecordContainer\renderForeignRecordHeader().

static getRecordLocalization (   $table,
  $uid,
  $language,
  $andWhereClause = '' 
)
static

Fetches the localization for a given record.

Parameters
string$tableTable name present in $GLOBALS['TCA']
int$uidThe uid of the record
int$languageThe uid of the language record in sys_language
string$andWhereClauseOptional additional WHERE clause (default: '')
Returns
mixed Multidimensional array with selected records; if none exist, FALSE is returned

Definition at line 303 of file backend/Classes/Utility/BackendUtility.php.

References $GLOBALS.

Referenced by DataHandler\getPreviousLocalizedRecordUid().

static getRecordPath (   $uid,
  $clause,
  $titleLimit,
  $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$clauseClause is 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 470 of file backend/Classes/Utility/BackendUtility.php.

References GeneralUtility\fixed_lgd_cs().

Referenced by SuggestWizardDefaultReceiver\getRecordPath(), ImportExportTask\main(), OuterWrapContainer\render(), and ActionTask\viewEditRecord().

static getRecordRaw (   $table,
  $where = '',
  $fields = '*' 
)
static

Returns the first record found from $table with $where as WHERE clause This function does NOT check if a record has the deleted flag set. $table does NOT need to be configured in $GLOBALS['TCA'] The query used is simply this: $query = 'SELECT ' . $fields . ' FROM ' . $table . ' WHERE ' . $where;

Parameters
string$tableTable name (not necessarily in TCA)
string$whereWHERE clause
string$fields$fields is a list of fields to select, default is '*'
Returns
array|bool First row found, if any, FALSE otherwise

Definition at line 161 of file backend/Classes/Utility/BackendUtility.php.

Referenced by DataHandler\deleteRecord(), DataHandler\doesRecordExist(), CleanerCommand\genTree_traverse(), and ReferenceIndex\updateRefIndexTable().

static getRecordsByField (   $theTable,
  $theField,
  $theValue,
  $whereClause = '',
  $groupBy = '',
  $orderBy = '',
  $limit = '',
  $useDeleteClause = true 
)
static

Returns records from table, $theTable, where a field ($theField) equals the value, $theValue The records are returned in an array If no records were selected, the function returns nothing

Parameters
string$theTableTable name present in $GLOBALS['TCA']
string$theFieldField to select on
string$theValueValue that $theField must match
string$whereClauseOptional additional WHERE clauses put in the end of the query. DO NOT PUT IN GROUP BY, ORDER BY or LIMIT!
string$groupByOptional GROUP BY field(s), if none, supply blank string.
string$orderByOptional ORDER BY field(s), if none, supply blank string.
string$limitOptional LIMIT value ([begin,]max), if none, supply blank string.
bool$useDeleteClauseUse the deleteClause to check if a record is deleted (default TRUE)
Returns
mixed Multidimensional array with selected records (if any is selected)

Definition at line 187 of file backend/Classes/Utility/BackendUtility.php.

References $GLOBALS.

Referenced by PageLinkHandler\canHandleLink(), BackendUserAuthentication\checkFullLanguagesAccess(), DataHandler\copyL10nOverlayRecords(), DataHandler\deleteL10nOverlayRecords(), DataHandler\getRecordsWithSameValue(), BackendController\handlePageEditing(), PageLayoutController\makeQuickEditMenu(), DataHandler\moveL10nOverlayRecords(), and RteHtmlParser\TS_links_rte().

static getRecordsSortedByTitle ( array  $fields,
  $table,
  $titleField,
  $where = '' 
)
staticprotected

Returns an array of all non-deleted records of a table sorted by a given title field. The value of the title field will be replaced by the return value of self::getRecordTitle() before the sorting is performed.

Parameters
array$fieldsFields to select
string$tableTable name
string$titleFieldField that will contain the record title
string$whereAdditional where clause
Returns
array Array of sorted records

Definition at line 1419 of file backend/Classes/Utility/BackendUtility.php.

References ArrayUtility\sortArraysByKey().

static getRecordTitle (   $table,
  $row,
  $prep = false,
  $forceResult = true 
)
static

Returns the "title"-value in record, $row, from table, $table The field(s) from which the value is taken is determined by the "ctrl"-entries 'label', 'label_alt' and 'label_alt_force'

Parameters
string$tableTable name, present in TCA
array$rowRow from table
bool$prepIf set, result is prepared for output: The output is cropped to a limited length (depending on BE_USER->uc['titleLen']) and if no value is found for the title, '[No title]' is returned (localized). Further, the output is htmlspecialchars()'ed
bool$forceResultIf set, the function always returns an output. If no value is found for the title, '[No title]' is returned (localized).
Returns
string

Definition at line 2172 of file backend/Classes/Utility/BackendUtility.php.

Referenced by ValidatorTask\buildMail(), IntegrityService\checkLocalization(), PageLinkHandler\expandPage(), ImportExport\export_addRecord(), RecordHistory\generateTitle(), ValidatorTask\getAdditionalInformation(), DocumentTemplate\getHeader(), PageLayoutController\getHeaderFlashMessagesForCurrentPid(), SuggestWizardDefaultReceiver\getLabel(), LinkAnalyzer\getLinkStatistics(), DocumentTemplate\getPageInfo(), LiveSearch\getRecordArray(), PagePositionMap\getRecordHeader(), MetaInformation\getRecordInformation(), DataHandler\getRecordPropertiesFromRow(), ElementBrowserRecordList\linkWrapItems(), AbstractDatabaseRecordList\linkWrapItems(), DatabaseIntegrityCheck\lostRecords(), MoveElementController\main(), LinkValidatorReport\main(), ImportExportController\makeConfigurationForm(), ElementInformationController\makeRef(), ElementInformationController\makeRefFrom(), VersionModuleController\pageSubContent(), Clipboard\printContentFromTab(), ClickMenu\printDBClickMenu(), RelationHandler\readyForInterface(), OuterWrapContainer\render(), DatabaseRecordList\renderListRow(), ElementInformationController\renderPageTitle(), DeletedRecordsController\transform(), VersionModuleController\versioningMgm(), and ActionTask\viewEditRecord().

static getRecordTitlePrep (   $title,
  $titleLength = 0 
)
static

Crops a title string to a limited length and if it really was cropped, wrap it in a |, which offers a tooltip with the original title when moving mouse over it.

Parameters
string$titleThe title string to be cropped
int$titleLengthCrop title after this length - if not set, BE_USER->uc['titleLen'] is used
Returns
string The processed title string, wrapped in | if cropped

Definition at line 2237 of file backend/Classes/Utility/BackendUtility.php.

Referenced by TcaRecordTitle\addData(), UserFileInlineLabelService\getInlineLabel(), ElementBrowserRecordList\linkWrapItems(), and OuterWrapContainer\render().

static getRecordToolTip ( array  $row,
  $table = 'pages' 
)
static

Returns the combined markup for Bootstraps tooltips

Parameters
array$row
string$table
Returns
string

Definition at line 1938 of file backend/Classes/Utility/BackendUtility.php.

Referenced by PageLayoutView\getIcon(), PagePositionMap\getRecordHeader(), MetaInformation\getRecordInformation(), MoveElementController\main(), and DatabaseRecordList\renderListRow().

static getRecordWSOL (   $table,
  $uid,
  $fields = '*',
  $where = '',
  $useDeleteClause = true,
  $unsetMovePointers = false 
)
static

Like getRecord(), but overlays workspace version if any.

Parameters
string$tableTable name present in $GLOBALS['TCA']
int$uidUID of record
string$fieldsList of fields to select
string$whereAdditional WHERE clause, eg. " AND blablabla = 0
bool$useDeleteClauseUse the deleteClause to check if a record is deleted (default TRUE)
bool$unsetMovePointersIf TRUE the function does not return a "pointer" row for moved records in a workspace
Returns
array Returns the row if found, otherwise nothing

Definition at line 129 of file backend/Classes/Utility/BackendUtility.php.

References GeneralUtility\inList(), and GeneralUtility\uniqueList().

Referenced by PageLinkHandler\canHandleLink(), PageLinkHandler\expandPage(), ExportPageTreeView\ext_tree(), PageLinkHandler\formatCurrentUrl(), AbstractDatabaseRecordList\generateList(), ConditionMatcher\getPageIdByRecord(), AbstractTreeView\getRecord(), DataProvider\getRecordWithWorkspaceOverlay(), BackendController\handlePageEditing(), ElementInformationController\initDatabaseRecord(), ElementInformationController\initFileOrFolderRecord(), TranslationStatusController\main(), InfoPageTyposcriptConfigController\main(), MoveElementController\main(), ImportExportController\makeConfigurationForm(), DataHandler\moveRecord_procFields(), Clipboard\printContentFromTab(), ClickMenu\printDBClickMenu(), ClickMenu\printNewDBLevel(), OuterWrapContainer\render(), InfoPageTyposcriptConfigController\renderList(), TypoScriptTemplateModuleController\renderList(), AjaxController\switchWorkspaceAction(), and TranslationConfigurationProvider\translationInfo().

static getRegisteredFlexForms (   $table = 'tt_content')
static

Returns all registered FlexForm definitions with title and fields

Parameters
string$tableThe content table
Returns
array The data structures with speaking extension title
See Also
::getExcludeFields()
Deprecated:
since TYPO3 CMS 7, will be removed in TYPO3 CMS 8

Definition at line 1135 of file backend/Classes/Utility/BackendUtility.php.

References $GLOBALS, GeneralUtility\getFileAbsFileName(), GeneralUtility\getUrl(), GeneralUtility\logDeprecatedFunction(), GeneralUtility\resolveAllSheetsInDS(), GeneralUtility\trimExplode(), and GeneralUtility\xml2array().

static getRuntimeCache ( )
staticprotected

Gets an instance of the runtime cache.

Returns
VariableFrontend

Definition at line 4090 of file backend/Classes/Utility/BackendUtility.php.

static getSignalSlotDispatcher ( )
staticprotected

Get the SignalSlot dispatcher

Returns

Definition at line 4866 of file backend/Classes/Utility/BackendUtility.php.

static getSpecConfParametersFromArray (   $pArr)
static

Takes an array of "[key] = [value]" strings and returns an array with the keys set as keys pointing to the value. Better see it in action! Find example in Inside TYPO3

Parameters
array$pArrArray of "[key] = [value]" strings to convert.
Returns
array

Definition at line 949 of file backend/Classes/Utility/BackendUtility.php.

Referenced by RteHtmlParser\RTE_transform(), and DataHandler\transformRichtextContentToDatabase().

static getSpecConfParts (   $defaultExtrasString,
  $_ = '' 
)
static

Parses "defaultExtras" of $GLOBALS['TCA'] columns config section to an array. Elements are split by ":" and within those parts, parameters are split by "|".

See unit tests for details.

Parameters
string$defaultExtrasString"defaultExtras" string from columns config
string$_,\xrefitemdeprecated 79.
Returns
array

Definition at line 916 of file backend/Classes/Utility/BackendUtility.php.

References GeneralUtility\deprecationLog(), and GeneralUtility\trimExplode().

Referenced by DataHandler\checkValue_flex_procInData_travDS(), BackendUtilityTest\getSpecConfPartsSplitsDefaultExtras(), RsaInputElement\render(), SelectMultipleSideBySideElement\render(), SelectSingleBoxElement\render(), SelectCheckBoxElement\render(), TextElement\render(), SelectTreeElement\render(), RichTextElement\render(), and RichTextNodeResolver\resolve().

static getSQLselectableList (   $in_list,
  $tablename,
  $default_tablename 
)
static

Returns a list of pure ints based on $in_list being a list of records with table-names prepended. Ex: $in_list = "pages_4,tt_content_12,45" would result in a return value of "4,45" if $tablename is "pages" and $default_tablename is 'pages' as well.

Parameters
string$in_listInput list
string$tablenameTable name from which ids is returned
string$default_tablename$default_tablename denotes what table the number '45' is from (if nothing is prepended on the value)
Returns
string List of ids

Definition at line 236 of file backend/Classes/Utility/BackendUtility.php.

References $list.

static getTcaFieldConfiguration (   $table,
  $field 
)
static

Gets the TCA configuration of a field.

Parameters
string$tableName of the table
string$fieldName of the field
Returns
array

Definition at line 4798 of file backend/Classes/Utility/BackendUtility.php.

Referenced by ElementEntityProcessor\createNewDependentElementChildReferenceCallback(), and ElementEntityProcessor\createNewDependentElementParentReferenceCallback().

static getTCAtypes (   $table,
  $rec,
  $useFieldNameAsKey = false 
)
static

Returns the "types" configuration parsed into an array for the record, $rec, from table, $table

Parameters
string$tableTable name (present in TCA)
array$recRecord from $table
bool$useFieldNameAsKeyIf $useFieldNameAsKey is set, then the fieldname is associative keys in the return array, otherwise just numeric keys.
Returns
array|NULL

Definition at line 778 of file backend/Classes/Utility/BackendUtility.php.

References $GLOBALS, elseif, and GeneralUtility\trimExplode().

Referenced by DataHandler\fillInFieldArray().

static getTCAtypeValue (   $table,
  $row 
)
static

Returns the "type" value of $rec from $table which can be used to look up the correct "types" rendering section in $GLOBALS['TCA'] If no "type" field is configured in the "ctrl"-section of the $GLOBALS['TCA'] for the table, zero is used. If zero is not an index in the "types" section of $GLOBALS['TCA'] for the table, then the $fieldValue returned will default to 1 (no matter if that is an index or not)

Note: This method is very similar to the type determination of FormDataProvider/DatabaseRecordTypeValue, however, it has two differences: 1) The method in TCEForms also takes care of localization (which is difficult to do here as the whole infrastructure for language overlays is only in TCEforms). 2) The $row array looks different in TCEForms, as in there it's not the raw record but the prepared data from other providers is handled, which changes e.g. how "select" and "group" field values are stored, which makes different processing of the "foreign pointer field" type field variant necessary.

Parameters
string$tableTable name present in TCA
array$rowRecord from $table
Exceptions
\RuntimeException
Returns
string Field value
See Also
getTCAtypes()

Definition at line 859 of file backend/Classes/Utility/BackendUtility.php.

References $GLOBALS, and elseif.

Referenced by DataHandler\checkValue_flex_procInData_travDS(), and DataHandler\fillInFieldArray().

static getTCEFORM_TSconfig (   $table,
  $row 
)
static

Returns TSConfig for the TCEFORM object in Page TSconfig. Used in TCEFORMs

Parameters
string$tableTable name present in TCA
array$rowRow from table
Returns
array

Definition at line 3800 of file backend/Classes/Utility/BackendUtility.php.

Referenced by FormEngineUtility\getTSconfigForTableRow(), AddController\init(), ListController\main(), and NewContentElementController\removeInvalidElements().

static getThumbNail (   $thumbScript,
  $theFile,
  $tparams = '',
  $size = '' 
)
static

Returns single image tag to thumbnail using a thumbnail script (like thumbs.php)

Parameters
string$thumbScriptMust point to "thumbs.php" relative to the script position
string$theFileMust be the proper reference to the file that thumbs.php should show
string$tparamsThe additional attributes for the image tag
string$sizeThe size of the thumbnail send along to thumbs.php
Returns
string Image tag
Deprecated:
since TYPO3 CMS 7, will be removed with TYPO3 CMS 8, use the corresponding Resource objects and Processing functionality

Definition at line 1827 of file backend/Classes/Utility/BackendUtility.php.

References $url.

static getTSconfig_pidValue (   $table,
  $uid,
  $pid 
)
static

Find the real PID of the record (with $uid from $table). This MAY be impossible if the pid is set as a reference to the former record or a page (if two records are created at one time). NOTICE: Make sure that the input PID is never negative because the record was an offline version! Therefore, you should always use BackendUtility::fixVersioningPid($table,$row); on the data you input before calling this function!

Parameters
string$tableTable name
int$uidRecord uid
int$pidRecord pid, could be negative then pointing to a record from same table whose pid to find and return
Returns
int

Definition at line 3851 of file backend/Classes/Utility/BackendUtility.php.

Referenced by DataHandler\copyL10nOverlayRecords().

static getTSCpid (   $table,
  $uid,
  $pid 
)
static

Returns the REAL pid of the record, if possible. If both $uid and $pid is strings, then pid=-1 is returned as an error indication.

Parameters
string$tableTable name
int$uidRecord uid
int$pidRecord pid
Returns
array Array of two ints; first is the REAL PID of a record and if its a new record negative values are resolved to the true PID, second value is the PID value for TSconfig (uid if table is pages, otherwise the pid)

Definition at line 3938 of file backend/Classes/Utility/BackendUtility.php.

static getTSCpidCached (   $table,
  $uid,
  $pid 
)
static

Return the real pid of a record and caches the result. The non-cached method needs database queries to do the job, so this method can be used if code sometimes calls the same record multiple times to save some queries. This should not be done if the calling code may change the same record meanwhile.

Parameters
string$tableTablename
string$uidUID value
string$pidPID value
Returns
array Array of two integers; first is the real PID of a record, second is the PID value for TSconfig.

Definition at line 3911 of file backend/Classes/Utility/BackendUtility.php.

Referenced by RichTextNodeResolver\resolve().

static getUpdateSignalCode ( )
static

Call to update the page tree frame (or something else..?) if this is set by the function setUpdateSignal(). It will return some JavaScript that does the update

Returns
string HTML javascript code
See Also
BackendUtility::setUpdateSignal()
::sectionEnd

Definition at line 3377 of file backend/Classes/Utility/BackendUtility.php.

Referenced by DocumentTemplate\endPage(), and ModuleTemplate\renderContent().

static getUrlToken (   $formName = 'securityToken',
  $tokenName = 'formToken' 
)
static

Generates a token and returns a parameter for the URL

Parameters
string$formNameContext of the token
string$tokenNameThe name of the token GET variable
Exceptions
\InvalidArgumentException
Returns
string A URL GET variable including ampersand
Deprecated:
since TYPO3 7, will be removed in TYPO3 8. All backend modules and routes are secured by default now. If you need a url parameter with a token, use the form protection directly.

Definition at line 3568 of file backend/Classes/Utility/BackendUtility.php.

static getUserNames (   $fields = 'username,
usergroup  ,
usergroup_cached_list  ,
uid'  ,
  $where = '' 
)
static

Returns an array with be_users records of all user NOT DELETED sorted by their username Keys in the array is the be_users uid

Parameters
string$fieldsOptional $fields list (default: username,usergroup,usergroup_cached_list,uid) can be used to set the selected fields
string$whereOptional $where clause (fx. "AND username='pete'") can be used to limit query
Returns
array

Definition at line 1381 of file backend/Classes/Utility/BackendUtility.php.

References GeneralUtility\trimExplode().

Referenced by HistoryService\__construct(), PermissionController\editAction(), StagesService\getBackendUsers(), PermissionAjaxController\renderUserSelector(), StagesService\resolveBackendUserIds(), and SetupModuleController\simulateUser().

static getWorkspaceVersionOfRecord (   $workspace,
  $table,
  $uid,
  $fields = '*' 
)
static

Select the workspace version of a record, if exists

Parameters
int$workspaceWorkspace ID
string$tableTable name to select from
int$uidRecord uid for which to find workspace version.
string$fieldsField list to select
Returns
array If found, return record, otherwise FALSE

Definition at line 4461 of file backend/Classes/Utility/BackendUtility.php.

Referenced by ElementEntityProcessor\createNewDependentElementCallback(), EditDocumentController\getRecordForEdit(), TcaInline\getWorkspacedUids(), VersionsCommand\main(), DataHandlerHook\moveRecord(), DataHandlerHook\moveRecord_processFields(), DataHandlerHook\moveRecord_processFieldValue(), DataHandlerHook\processCmdmap_deleteAction(), RecordHistory\resolveElement(), DataHandler\versionizeRecord(), and BackendUserAuthentication\workspaceAllowAutoCreation().

static getWorkspaceWhereClause (   $table,
  $workspaceId = null 
)
static

Get additional where clause to select records of a specific workspace (includes live as well).

Parameters
string$tableTable name
int$workspaceIdWorkspace ID
Returns
string Workspace where clause

Definition at line 4534 of file backend/Classes/Utility/BackendUtility.php.

Referenced by DataHandlerHook\flushWorkspaceElements().

static helpTextArray (   $table,
  $field 
)
static

Returns CSH help text (description), if configured for, as an array (title, description)

Parameters
string$tableTable name
string$fieldField name
Returns
array With keys 'description' (raw, as available in locallang), 'title' (optional), 'moreInfo'

Definition at line 2759 of file backend/Classes/Utility/BackendUtility.php.

static helpTextIcon (   $table,
  $field,
  $_ = '',
  $force = false 
)
static

Returns help-text icon if configured for. TCA_DESCR must be loaded prior to this function

Please note: since TYPO3 4.5 the UX team decided to not use CSH in its former way, but to wrap the given text (where before the help icon was, and you could hover over it) Please also note that since TYPO3 4.5 the option to enable help (none, icon only, full text) was completely removed.

Parameters
string$tableTable name
string$fieldField name
string$_UNUSED
bool$forceForce display of icon no matter BE_USER setting for help
Returns
string HTML content for a help icon/text
Deprecated:
since TYPO3 CMS 7, will be removed in TYPO3 CMS 8, use cshItem() instead

Definition at line 2743 of file backend/Classes/Utility/BackendUtility.php.

static implodeTSParams (   $p,
  $k = '' 
)
static

Implodes a multi dimensional TypoScript array, $p, into a one-dimensional array (return value)

Parameters
array$pTypoScript structure
string$kPrefix string
Returns
array Imploded TypoScript objectstring/values
Deprecated:
since TYPO3 CMS 7, will be removed in TYPO3 CMS 8

Definition at line 1352 of file backend/Classes/Utility/BackendUtility.php.

References GeneralUtility\logDeprecatedFunction().

static isModuleSetInTBE_MODULES (   $modName)
static

Returns TRUE if $modName is set and is found as a main- or submodule in $TBE_MODULES array

Parameters
string$modNameModule name
Returns
bool

Definition at line 4142 of file backend/Classes/Utility/BackendUtility.php.

References $list.

Referenced by VersionModuleController\adminLinks(), ClickMenu\DB_edit(), PreviewController\generateJavascript(), BackendController\generateJavascript(), AdminPanelView\getEditModule(), VersionModuleController\main(), and BackendUserAuthentication\modAccess().

static isRecordLocked (   $table,
  $uid 
)
static

Returns information about whether the record from table, $table, with uid, $uid is currently locked (edited by another user - which should issue a warning). Notice: Locking is not strictly carried out since locking is abandoned when other backend scripts are activated - which means that a user CAN have a record "open" without having it locked. So this just serves as a warning that counts well in 90% of the cases, which should be sufficient.

Parameters
string$tableTable name
int$uidRecord uid
Returns
array

Definition at line 3624 of file backend/Classes/Utility/BackendUtility.php.

References $lang, and elseif.

Referenced by DatabaseRecordList\renderListRow(), and PageLayoutView\tt_content_drawHeader().

static isRootLevelRestrictionIgnored (   $table)
static

Whether to ignore restrictions on root-level records. The regular behaviour is that records on the root-level (page-id 0) only can be accessed by admin users.

Parameters
string$tableName of the table
Returns
bool

Definition at line 4828 of file backend/Classes/Utility/BackendUtility.php.

Referenced by DatabaseUserPermissionCheck\addData(), DataHandler\checkRecordInsertAccess(), DataHandler\doesRecordExist(), WorkspaceService\isPageAccessibleForCurrentUser(), DataHandler\isTableAllowedForThisPage(), and WorkspaceService\selectAllVersionsFromPages().

static isTableLocalizable (   $table)
static
static isTableMovePlaceholderAware (   $table)
static

Determines whether a table is aware of using move placeholders, which means 'versioningWS' is set to 2. As of TYPO3 CMS 7, move placeholders is used as default so the method is obsolete.

Parameters
string$table
Returns
bool
Deprecated:
since TYPO3 CMS 7, will be removed in TYPO3 CMS 8, use isTableWorkspaceEnabled() directly

Definition at line 4786 of file backend/Classes/Utility/BackendUtility.php.

static isTableWorkspaceEnabled (   $table)
static
static isWebMountRestrictionIgnored (   $table)
static

Whether to ignore restrictions on a web-mount of a table. The regular behaviour is that records to be accessed need to be in a valid user's web-mount.

Parameters
string$tableName of the table
Returns
bool

Definition at line 4815 of file backend/Classes/Utility/BackendUtility.php.

Referenced by DataHandler\doesRecordExist().

static lockRecords (   $table = '',
  $uid = 0,
  $pid = 0 
)
static

Unlock or Lock a record from $table with $uid If $table and $uid is not set, then all locking for the current BE_USER is removed!

Parameters
string$tableTable name
int$uidRecord uid
int$pidRecord pid
Returns
void

Definition at line 3590 of file backend/Classes/Utility/BackendUtility.php.

References if.

Referenced by RecordList\mainAction(), and EditDocumentController\mainAction().

static makeConfigForm (   $configArray,
  $defaults,
  $dataPrefix 
)
static

Makes a form for configuration of some values based on configuration found in the array $configArray, with default values from $defaults and a data-prefix $dataPrefix <form>-tags must be supplied separately Needs more documentation and examples, in particular syntax for configuration array. See Inside TYPO3. That's were you can expect to find example, if anywhere.

Parameters
array$configArrayField configuration code.
array$defaultsDefaults
string$dataPrefixPrefix for formfields
Returns
string HTML for a form.

Definition at line 2673 of file backend/Classes/Utility/BackendUtility.php.

static movePlhOL (   $table,
$row 
)
static

Checks if record is a move-placeholder (t3ver_state==VersionState::MOVE_PLACEHOLDER) and if so it will set $row to be the pointed-to live record (and return TRUE)

Parameters
string$tableTable name
array$rowRow (passed by reference) - must be online record!
Returns
bool TRUE if overlay is made.
See Also
PageRepository::movePlhOl()

Definition at line 4429 of file backend/Classes/Utility/BackendUtility.php.

Referenced by VersionsCommand\main().

static openPageTree (   $pid,
  $clearExpansion 
)
static

Opens the page tree to the specified page id

Parameters
int$pidPage id.
bool$clearExpansionIf set, then other open branches are closed.
Returns
void

Definition at line 430 of file backend/Classes/Utility/BackendUtility.php.

Referenced by BackendController\handlePageEditing().

static processParams (   $params)
static

Returns an array with key=>values based on input text $params $params is exploded by line-breaks and each line is supposed to be on the syntax [key] = [some value] These pairs will be parsed into an array an returned.

Parameters
string$paramsString of parameters on multiple lines to parse into key-value pairs (see function description)
Returns
array

Definition at line 4730 of file backend/Classes/Utility/BackendUtility.php.

static readPageAccess (   $id,
  $perms_clause 
)
static

Returns a page record (of page with $id) with an extra field "_thePath" set to the record path IF the WHERE clause, $perms_clause, selects the record. Thus is works as an access check that returns a page record if access was granted, otherwise not. If $id is zero a pseudo root-page with "_thePath" set is returned IF the current BE_USER is admin. In any case ->isInWebMount must return TRUE for the user (regardless of $perms_clause)

Parameters
int$idPage uid for which to check read-access
string$perms_clauseThis is typically a value generated with static::getBackendUserAuthentication()->getPagePermsClause(1);
Returns
array Returns page record if OK, otherwise FALSE.

Definition at line 745 of file backend/Classes/Utility/BackendUtility.php.

Referenced by SuggestWizardDefaultReceiver\checkRecordAccess(), ViewModuleController\getAdminCommand(), LiveSearch\getEditLink(), RecordHistory\hasPageAccess(), NewContentElementController\init(), NewRecordController\init(), PageLayoutController\init(), ElementInformationController\initDatabaseRecord(), LinkValidatorReport\initialize(), PermissionController\initializeAction(), PageTreeNavigationController\initializeTemporaryDBmount(), InfoModuleController\main(), PageFunctionsController\main(), MoveElementController\main(), ImportExportController\main(), VersionModuleController\main(), DataHandlerHook\moveRecord_wsPlaceholders(), PagePathViewHelper\renderStatic(), ElementHistoryController\setPagePath(), BackendLayoutWizardController\setPagePath(), and ActionTask\viewRecordList().

static referenceCount (   $table,
  $ref,
  $msg = '',
  $count = null 
)
static

Counting references to a record/file

Parameters
string$tableTable name (or "_FILE" if its a file)
string$refReference: If table, then int-uid, if _FILE, then file reference (relative to PATH_site)
string$msgMessage with s, eg. "There were s records pointing to this file!
string | NULL$countReference count
Returns
string Output string (or int count value if no msg string specified)

Definition at line 4166 of file backend/Classes/Utility/BackendUtility.php.

Referenced by ClickMenu\DB_delete(), and ClickMenu\FILE_delete().

static replaceL10nModeFields (   $table,
array  $row 
)
staticprotected

Replace field values in given row with values from the original language if l10n_mode TCA settings require to do so.

Parameters
string$tableTable name
array$rowRow to fill with original language values
Returns
array Row with values from the original language

Definition at line 2140 of file backend/Classes/Utility/BackendUtility.php.

static replaceMarkersInWhereClause (   $whereClause,
  $table,
  $field = '',
  $tsConfig = array() 
)
static

Replaces all special markers in a where clause. Special markers are:

REC_FIELD_[field name]

THIS_UID### - is current element uid (zero if new).

CURRENT_PID### - is the current page id (pid of the record).

STORAGE_PID

SITEROOT

PAGE_TSCONFIG_ID### - a value you can set from Page TSconfig dynamically.

PAGE_TSCONFIG_IDLIST### - a value you can set from Page TSconfig dynamically.

PAGE_TSCONFIG_STR### - a value you can set from Page TSconfig dynamically.

Parameters
string$whereClauseWhere clause with markers
string$tableName of the table of the current record row
string$fieldField name
array$tsConfigTSconfig array from which to get further configuration settings for the field name
Returns
string
Deprecated:
since TYPO3 CMS 7, will be removed in TYPO3 CMS 8

Definition at line 3751 of file backend/Classes/Utility/BackendUtility.php.

static RTEgetObj ( )
static

Returns first possible RTE object if available. Usage: $RTEobj = BackendUtility::RTEgetObj();

Returns
mixed If available, returns RTE object, otherwise an array of messages from possible RTEs
Deprecated:
since TYPO3 CMS 7, will be removed in TYPO3 CMS 8

Definition at line 4023 of file backend/Classes/Utility/BackendUtility.php.

static RTEsetup (   $RTEprop,
  $table,
  $field,
  $type = '' 
)
static

Returns processed RTE setup from an array with TSconfig. Merges table and type specific RTE configuration into 'default.'

Parameters
array$RTEpropThe properties of Page TSconfig in the key "RTE.
string$tableTable name
string$fieldField name
string$typeType value of the current record (like from CType of tt_content)
Returns
array Array with the configuration for the RTE

Definition at line 4002 of file backend/Classes/Utility/BackendUtility.php.

Referenced by DataHandler\checkValue_flex_procInData_travDS(), DataHandler\fillInFieldArray(), BrowseLinksController\initVariables(), RichTextElement\render(), and RichTextNodeResolver\resolve().

static selectVersionsOfRecord (   $table,
  $uid,
  $fields = '*',
  $workspace = 0,
  $includeDeletedRecords = false,
  $row = null 
)
static

Select all versions of a record, ordered by version id (DESC)

Parameters
string$tableTable name to select from
int$uidRecord uid for which to find versions.
string$fieldsField list to select
int | NULL$workspaceSearch in workspace ID and Live WS, if 0 search only in LiveWS, if NULL search in all WS.
bool$includeDeletedRecordsIf set, deleted-flagged versions are included! (Only for clean-up script!)
array$rowThe current record
Returns
array|NULL Array of versions of table/uid

Definition at line 4223 of file backend/Classes/Utility/BackendUtility.php.

References elseif.

Referenced by DataHandler\deleteVersionsForRecord(), CleanerCommand\genTree_traverse(), VersionModuleController\lookForOwnVersions(), VersionsCommand\main(), and VersionModuleController\versioningMgm().

static setUpdateSignal (   $set = '',
  $params = '' 
)
static

Call to update the page tree frame (or something else..?) after use 'updatePageTree' as a first parameter will set the page tree to be updated.

Parameters
string$setKey to set the update signal. When setting, this value contains strings telling WHAT to set. At this point it seems that the value "updatePageTree" is the only one it makes sense to set. If empty, all update signals will be removed.
mixed$paramsAdditional information for the update signal, used to only refresh a branch of the tree
Returns
void
See Also
BackendUtility::getUpdateSignalCode()

Definition at line 3353 of file backend/Classes/Utility/BackendUtility.php.

Referenced by EditDocumentController\closeDocument(), FileController\finish(), SortPagesWizardModuleFunction\main(), CreatePagesWizardModuleFunctionController\main(), SimpleDataHandlerController\main(), SetupModuleController\main(), and FileController\mainAction().

static shortcutExists (   $url)
static

Exists already a shortcut entry for this TYPO3 url?

Parameters
string$url
Returns
bool

Definition at line 4840 of file backend/Classes/Utility/BackendUtility.php.

References $url.

Referenced by ModuleTemplate\makeShortcutIcon(), DocumentTemplate\makeShortcutIcon(), and ShortcutToolbarItem\tryAddingTheShortcut().

static& softRefParserObj (   $spKey)
static

Returns soft-reference parser for the softRef processing type Usage: $softRefObj = &BackendUtility::softRefParserObj('[parser key]');

Parameters
string$spKeysoftRef parser key
Returns
mixed If available, returns Soft link parser object.

Definition at line 4059 of file backend/Classes/Utility/BackendUtility.php.

References elseif.

Referenced by ReferenceIndex\getRelations(), and ReferenceIndex\getRelations_flexFormCallBack().

static splitTable_Uid (   $str)
static

Makes an backwards explode on the $str and returns an array with ($table, $uid). Example: tt_content_45 => array('tt_content', 45)

Parameters
string$str[tablename]_[uid] string to explode
Returns
array

Definition at line 221 of file backend/Classes/Utility/BackendUtility.php.

Referenced by UserFileInlineLabelService\getInlineLabel(), TcaInputPlaceholders\getRelatedGroupFieldUids(), and InlineRecordContainer\renderForeignRecordHeader().

static time (   $value,
  $withSeconds = true 
)
static

Returns $value (in seconds) formatted as hh:mm:ss For instance $value = 3600 + 60*2 + 3 should return "01:02:03"

Parameters
int$valueTime stamp, seconds
bool$withSecondsOutput hh:mm:ss. If FALSE: hh:mm
Returns
string Formatted time

Definition at line 1570 of file backend/Classes/Utility/BackendUtility.php.

Referenced by TcaRecordTitle\getRecordTitleForInputType().

static titleAltAttrib (   $content)
static

Returns alt="" and title="" attributes with the value of $content.

Parameters
string$contentValue for 'alt' and 'title' attributes (will be htmlspecialchars()'ed before output)
Returns
string

Definition at line 1635 of file backend/Classes/Utility/BackendUtility.php.

static titleAttribForPages (   $row,
  $perms_clause = '',
  $includeAttrib = true 
)
static

Returns title-attribute information for a page-record informing about id, alias, doktype, hidden, starttime, endtime, fe_group etc.

Parameters
array$rowInput must be a page row ($row) with the proper fields set (be sure - send the full range of fields for the table)
string$perms_clauseThis is used to get the record path of the shortcut page, if any (and doktype==4)
bool$includeAttribIf $includeAttrib is set, then the 'title=""' attribute is wrapped about the return value, which is in any case htmlspecialchar()'ed already
Returns
string

Definition at line 1848 of file backend/Classes/Utility/BackendUtility.php.

References $lang, and elseif.

Referenced by BrowseTreeView\getTitleAttrib(), and CreatePagesWizardModuleFunctionController\main().

static translationCount (   $table,
  $ref,
  $msg = '' 
)
static

Counting translations of records

Parameters
string$tableTable name
string$refReference: the record's uid
string$msgMessage with s, eg. "This record has s translation(s) which will be deleted, too!
Returns
string Output string (or int count value if no msg string specified)

Definition at line 4194 of file backend/Classes/Utility/BackendUtility.php.

Referenced by ClickMenu\DB_delete(), and PageLayoutView\tt_content_drawHeader().

static TYPO3_copyRightNotice ( )
static

Prints TYPO3 Copyright notice for About Modules etc. modules.

Warning: DO NOT prevent this notice from being shown in ANY WAY. According to the GPL license an interactive application must show such a notice on start-up ('If the program is interactive, make it output a short notice... ' - see GPL.txt) Therefore preventing this notice from being properly shown is a violation of the license, regardless of whether you remove it or use a stylesheet to obstruct the display.

Returns
string Text/Image (HTML) for copyright notice.

Definition at line 4654 of file backend/Classes/Utility/BackendUtility.php.

References $lang.

Referenced by ModulesController\indexAction().

static unsetMenuItems (   $modTSconfig,
  $itemArray,
  $TSref 
)
static

Removes menu items from $itemArray if they are configured to be removed by TSconfig for the module ($modTSconfig) See Inside TYPO3 about how to program modules and use this API.

Parameters
array$modTSconfigModule TS config array
array$itemArrayArray of items from which to remove items.
string$TSref$TSref points to the "object string" in $modTSconfig
Returns
array The modified $itemArray is returned.

Definition at line 3330 of file backend/Classes/Utility/BackendUtility.php.

Referenced by PageLayoutController\makeActionMenu(), TaskModuleController\menuConfig(), and BaseScriptClass\menuConfig().

static versioningPlaceholderClause (   $table)
static

Will return where clause de-selecting new(/deleted)-versions from other workspaces. If in live-workspace, don't show "MOVE-TO-PLACEHOLDERS" records if versioningWS is 2 (allows moving)

Parameters
string$tableTable name
Returns
string Where clause if applicable.

Definition at line 4518 of file backend/Classes/Utility/BackendUtility.php.

Referenced by DatabasePageLanguageOverlayRows\addData(), EditDocumentController\editRegularContentFromId(), PageLayoutController\exec_languageQuery(), PageLinkHandler\expandPage(), AbstractDatabaseRecordList\generateList(), TranslationStatusController\getContentElementCount(), AbstractTreeView\getCount(), AbstractTreeView\getDataInit(), TranslationStatusController\getLangStatus(), PageLayoutController\getLocalizedPageTitle(), PageLayoutController\getNumberOfHiddenElements(), InfoPageTyposcriptConfigController\getOverviewOfPagesUsingTSConfig(), LocalizationController\getRecordsToCopyDatabaseResult(), ShortcutToolbarItem\getShortcutIcon(), PageLayoutView\getTable_pages(), PageLayoutView\getTableMenu(), DataProvider\getWhereClause(), AbstractRecordList\initializeLanguages(), EditDocumentController\languageSwitch(), EditDocumentController\localizationRedirect(), PageLayoutController\makeButtons(), AbstractDatabaseRecordList\makeQueryArray(), LiveSearch\makeQuerySearchByTable(), PageLayoutController\makeQuickEditMenu(), PageLayoutView\numberOfRecords(), PagePositionMap\printContentElementColumns(), and TranslationConfigurationProvider\translationInfo().

static viewOnClick (   $pageUid,
  $backPath = '',
  $rootLine = null,
  $anchorSection = '',
  $alternativeUrl = '',
  $additionalGetVars = '',
  $switchFocus = true 
)
static

Returns a JavaScript string for viewing the page id, $id It will detect the correct domain name if needed and provide the link with the right back path. Also it will re-use any window already open.

Parameters
int$pageUidPage UID
string$backPathMust point back to TYPO3_mainDir (where the site is assumed to be one level above)
array | NULL$rootLineIf root line is supplied the function will look for the first found domain record and use that URL instead (if found)
string$anchorSectionOptional anchor to the URL
string$alternativeUrlAn alternative URL that, if set, will ignore other parameters except $switchFocus: It will return the window.open command wrapped around this URL!
string$additionalGetVarsAdditional GET variables.
bool$switchFocusIf TRUE, then the preview window will gain the focus.
Returns
string

Definition at line 2931 of file backend/Classes/Utility/BackendUtility.php.

Referenced by VersionModuleController\adminLinks(), ClickMenu\DB_view(), EditDocumentController\generatePreviewCode(), InfoModuleController\getButtons(), PageFunctionsController\getButtons(), DatabaseRecordList\getButtons(), VersionModuleController\getButtons(), ImportExportController\getButtons(), NewRecordController\getButtons(), TypoScriptTemplateModuleController\getButtons(), DatabaseRecordList\getDocHeaderButtons(), ElementInformationController\getRecordActions(), AbstractDatabaseRecordList\linkWrapItems(), PageLayoutController\main(), PageLayoutController\makeButtons(), TranslationStatusController\renderL10nTable(), BackendUtilityTest\viewOnClickReturnsOnClickCodeWithAlternativeUrl(), DocumentTemplate\viewPageIcon(), and WorkspaceService\viewSingleRecord().

static workspaceOL (   $table,
$row,
  $wsid = -99,
  $unsetMovePointers = false 
)
static

Workspace Preview Overlay Generally ALWAYS used when records are selected based on uid or pid. If records are selected on other fields than uid or pid (eg. "email = ....") then usage might produce undesired results and that should be evaluated on individual basis. Principle; Record online! => Find offline? Recently, this function has been modified so it MAY set $row to FALSE. This happens if a version overlay with the move-id pointer is found in which case we would like a backend preview. In other words, you should check if the input record is still an array afterwards when using this function.

Parameters
string$tableTable name
array$rowRecord array passed by reference. As minimum, the "uid" and "pid" fields must exist! Fake fields cannot exist since the fields in the array is used as field names in the SQL look up. It would be nice to have fields like "t3ver_state" and "t3ver_mode_id" as well to avoid a new lookup inside movePlhOL().
int$wsidWorkspace ID, if not specified will use static::getBackendUserAuthentication()->workspace
bool$unsetMovePointersIf TRUE the function does not return a "pointer" row for moved records in a workspace
Returns
void
See Also
fixVersioningPid()

Definition at line 4352 of file backend/Classes/Utility/BackendUtility.php.

Referenced by WorkspaceService\canCreatePreviewLink(), DataHandler\deleteL10nOverlayRecords(), ImportExport\export_addRecord(), ExtendedTemplateService\ext_getAllTemplates(), ExtendedTemplateService\ext_getFirstTemplate(), DataHandler\fillInFieldArray(), DataHandlerHook\findPageElementsForVersionSwap(), DataHandlerHook\findPageIdsForVersionStateChange(), AbstractTreeView\getDataNext(), TranslationStatusController\getLangStatus(), PageLayoutView\getNonTranslatedTTcontentUids(), BackendLayoutView\getPage(), RecyclerUtility\getRecordPath(), DataHandler\getRecordProperties(), PageLayoutView\getResult(), PageLayoutView\getTable_pages(), BackendController\handlePageEditing(), CreatePagesWizardModuleFunctionController\main(), PageLayoutView\makeOrdinaryList(), PageLayoutController\makeQuickEditMenu(), SuggestWizardDefaultReceiver\makeWorkspaceOverlay(), PageLayoutView\pages_getTree(), PagePositionMap\printContentElementColumns(), DataHandler\remapListedDBRecords(), DataHandler\updateFlexFormData(), and TemplateService\versionOL().

static wrapClickMenuOnIcon (   $content,
  $table,
  $uid = 0,
  $listFrame = true,
  $addParams = '',
  $enDisItems = '',
  $returnTagParameters = false 
)
static

Makes click menu link (context sensitive menu)

Returns $str wrapped in a link which will activate the context sensitive menu for the record ($table/$uid) or file ($table = file) The link will load the top frame with the parameter "&item" which is the table, uid and listFrame arguments imploded by "|": rawurlencode($table.'|'.$uid.'|'.$listFr)

Parameters
string$contentString to be wrapped in link, typ. image tag.
string$tableTable name/File path. If the icon is for a database record, enter the tablename from $GLOBALS['TCA']. If a file then enter the absolute filepath
int$uidIf icon is for database record this is the UID for the record from $table
bool$listFrameTells the top frame script that the link is coming from a "list" frame which means a frame from within the backend content frame.
string$addParamsAdditional GET parameters for the link to the ClickMenu AJAX request
string$enDisItemsEnable / Disable click menu items. Example: "+new,view" will display ONLY these two items (and any spacers in between), "new,view" will display all BUT these two items.
bool$returnTagParametersIf set, will return only the onclick JavaScript, not the whole link.
Returns
string The link wrapped input string.

Definition at line 2986 of file backend/Classes/Utility/BackendUtility.php.

Referenced by FileList\getButtonsAndOtherMarkers(), DocumentTemplate\getHeader(), PageLayoutView\getIcon(), DocumentTemplate\getPageInfo(), MetaInformation\getRecordInformation(), DocumentTemplate\getResourceHeader(), AbstractContainer\previewFieldValue(), OuterWrapContainer\render(), TranslationStatusController\renderL10nTable(), DatabaseRecordList\renderListRow(), DocumentTemplate\wrapClickMenuOnIcon(), BrowseTreeView\wrapIcon(), FolderTreeView\wrapIcon(), PageTreeView\wrapTitle(), and FolderTreeView\wrapTitle().

static wsMapId (   $table,
  $uid 
)
static

Performs mapping of new uids to new versions UID in case of import inside a workspace.

Parameters
string$tableTable name
int$uidRecord uid (of live record placeholder)
Returns
int Uid of offline version if any, otherwise live uid.

Definition at line 4604 of file backend/Classes/Utility/BackendUtility.php.

Referenced by DataHandler\copyRecord_raw(), DataHandler\dbAnalysisStoreExec(), ImportExport\processSoftReferences_substTokens(), DataHandler\remapListedDBRecords(), ImportExport\setFlexFormRelations(), and ImportExport\setRelations().

Member Data Documentation

$tcaTableTypeConfigurationCache = array()
staticprotected

Definition at line 61 of file backend/Classes/Utility/BackendUtility.php.