‪TYPO3CMS  10.4
TYPO3\CMS\Backend\Utility\BackendUtility Class Reference
Inheritance diagram for TYPO3\CMS\Backend\Utility\BackendUtility:
TYPO3\CMS\Backend\Tests\Unit\Utility\Fixtures\LabelFromItemListMergedReturnsCorrectFieldsFixture TYPO3\CMS\Backend\Tests\Unit\Utility\Fixtures\ProcessedValueForGroupWithMultipleAllowedTablesFixture TYPO3\CMS\Backend\Tests\Unit\Utility\Fixtures\ProcessedValueForGroupWithOneAllowedTableFixture TYPO3\CMS\Backend\Tests\Unit\Utility\Fixtures\ProcessedValueForSelectWithMMRelationFixture

Static Public Member Functions

static array null getRecord ($table, $uid, $fields=' *', $where='', $useDeleteClause=true)
 
static array getRecordWSOL ( $table, $uid, $fields=' *', $where='', $useDeleteClause=true, $unsetMovePointers=false)
 
static array< string, mixed > purgeComputedPropertiesFromRecord (array $record)
 
static array purgeComputedPropertyNames (array $propertyNames)
 
static array splitTable_Uid ($str)
 
static string BEenableFields ($table, $inv=false)
 
static mixed getRecordLocalization ($table, $uid, $language, $andWhereClause='')
 
static array BEgetRootLine ($uid, $clause='', $workspaceOL=false, array $additionalFields=[])
 
static openPageTree ($pid, $clearExpansion)
 
static mixed getRecordPath ($uid, $clause, $titleLimit, $fullTitleLimit=0)
 
static bool isTableLocalizable ($table)
 
static array false readPageAccess ($id, $perms_clause)
 
static string getTCAtypeValue ($table, $row)
 
static array getPagesTSconfig ($id)
 
static array getRawPagesTSconfig ($id, array $rootLine=null)
 
static array getUserNames ($fields='username, usergroup, usergroup_cached_list, uid', $where='')
 
static array getGroupNames ($fields='title, uid', $where='')
 
static array blindUserNames ($usernames, $groupArray, $excludeBlindedFlag=false)
 
static array blindGroupNames ($groups, $groupArray, $excludeBlindedFlag=false)
 
static int daysUntil ($tstamp)
 
static string date ($tstamp)
 
static string datetime ($value)
 
static string time ($value, $withSeconds=true)
 
static string calcAge ($seconds, $labels='min|hrs|days|yrs|min|hour|day|year')
 
static string dateTimeAge ($tstamp, $prefix=1, $date='')
 
static TYPO3 CMS Core Resource FileReference[] null resolveFileReferences ($tableName, $fieldName, $element, $workspaceId=null)
 
static string thumbCode ( $row, $table, $field, $backPath='', $thumbScript='', $uploaddir=null, $abs=0, $tparams='', $size='', $linkInfoPopup=true)
 
static string getThumbnailUrl (int $fileId, array $configuration)
 
static string titleAttribForPages ($row, $perms_clause='', $includeAttrib=true)
 
static string getRecordToolTip (array $row, $table='pages')
 
static string getRecordIconAltText ($row, $table='pages')
 
static string getLabelFromItemlist ($table, $col, $key)
 
static string getLabelFromItemListMerged ($pageId, $table, $column, $key)
 
static string getLabelsFromItemsList ($table, $column, $keyList, array $columnTsConfig=[])
 
static string getItemLabel ($table, $col)
 
static string getRecordTitle ($table, $row, $prep=false, $forceResult=true)
 
static string getRecordTitlePrep ($title, $titleLength=0)
 
static string getNoRecordTitle ($prep=false)
 
static string null getProcessedValue ( $table, $col, $value, $fixed_lgd_chars=0, $defaultPassthrough=false, $noRecordLookup=false, $uid=0, $forceResult=true, $pid=0)
 
static string getProcessedValueExtra ( $table, $fN, $fV, $fixed_lgd_chars=0, $uid=0, $forceResult=true, $pid=0)
 
static string getCommonSelectFields ($table, $prefix='', $fields=[])
 
static array helpTextArray ($table, $field)
 
static string helpText ($table, $field)
 
static string wrapInHelp ($table, $field, $text='', array $overloadHelpText=[])
 
static string cshItem ($table, $field, $_='', $wrap='')
 
static string editOnClick ($params, $_='', $requestUri='')
 
static string viewOnClick ( $pageUid, $backPath='', $rootLine=null, $anchorSection='', $alternativeUrl='', $additionalGetVars='', $switchFocus=true)
 
static string getPreviewUrl ( $pageUid, $backPath='', $rootLine=null, $anchorSection='', $alternativeUrl='', $additionalGetVars='', &$switchFocus=true)
 
static string wrapClickMenuOnIcon ( $content, $table, $uid=0, $context='', $_addParams='', $_enDisItems='', $returnTagParameters=false)
 
static string getLinkToDataHandlerAction ($parameters, $redirectUrl='')
 
static string getViewDomain ($pageId, $rootLine=null)
 
static string getFuncMenu ( $mainParams, $elementName, $currentValue, $menuItems, $script='', $addParams='')
 
static string getDropdownMenu ( $mainParams, $elementName, $currentValue, $menuItems, $script='', $addParams='')
 
static string getFuncCheck ( $mainParams, $elementName, $currentValue, $script='', $addParams='', $tagParams='')
 
static string getFuncInput ( $mainParams, $elementName, $currentValue, $size=10, $script='', $addParams='')
 
static setUpdateSignal ($set='', $params='')
 
static string getUpdateSignalCode ()
 
static array getModuleData ( $MOD_MENU, $CHANGED_SETTINGS, $modName, $type='', $dontValidateList='', $setDefaultList='')
 
static lockRecords ($table='', $uid=0, $pid=0)
 
static array bool isRecordLocked ($table, $uid)
 
static array getTCEFORM_TSconfig ($table, $row)
 
static int getTSconfig_pidValue ($table, $uid, $pid)
 
static array getTSCpidCached ($table, $uid, $pid)
 
static array getTSCpid ($table, $uid, $pid)
 
static mixed softRefParserObj ($spKey)
 
static array bool explodeSoftRefParserList ($parserList)
 
static bool isModuleSetInTBE_MODULES ($modName)
 
static string int referenceCount ($table, $ref, $msg='', $count=null)
 
static string translationCount ($table, $ref, $msg='')
 
static array null 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 bool movePlhOL ($table, &$row)
 
static array bool getWorkspaceVersionOfRecord ($workspace, $table, $uid, $fields=' *')
 
static array null getLiveVersionOfRecord ($table, $uid, $fields=' *')
 
static int null getLiveVersionIdOfRecord ($table, $uid)
 
static string versioningPlaceholderClause ($table)
 
static string getWorkspaceWhereClause ($table, $workspaceId=null)
 
static int wsMapId ($table, $uid)
 
static array bool getMovePlaceholder ($table, $uid, $fields=' *', $workspace=null)
 
static string TYPO3_copyRightNotice ()
 
static string ADMCMD_previewCmds ($pageInfo, Context $context)
 
static string getBackendScript ($interface='')
 
static bool isTableWorkspaceEnabled ($table)
 
static array getTcaFieldConfiguration ($table, $field)
 
static bool isWebMountRestrictionIgnored ($table)
 
static bool isRootLevelRestrictionIgnored ($table)
 

Static Protected Member Functions

static array getPageForRootline ($uid, $clause, $workspaceOL, array $additionalFields=[])
 
static array getRecordsSortedByTitle (array $fields, $table, $titleField, $where='')
 
static string buildScriptUrl ($mainParams, $addParams, $script='')
 
static FrontendInterface getRuntimeCache ()
 
static Connection getConnectionForTable ($table)
 
static QueryBuilder getQueryBuilderForTable ($table)
 
static LoggerInterface getLogger ()
 
static LanguageService getLanguageService ()
 
static BackendUserAuthentication null getBackendUserAuthentication ()
 

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: '\TYPO3\CMS\Backend\Utility\BackendUtility::getRecord('pages',51)'

Definition at line 74 of file BackendUtility.php.

Member Function Documentation

◆ ADMCMD_previewCmds()

static string TYPO3\CMS\Backend\Utility\BackendUtility::ADMCMD_previewCmds (   $pageInfo,
Context  $context 
)
static

Creates ADMCMD parameters for the "viewpage" extension / frontend

Parameters
array$pageInfo‪Page record
\TYPO3\CMS\Core\Context\Context$context
Returns
‪string Query-parameters

Definition at line 3922 of file BackendUtility.php.

References $GLOBALS, TYPO3\CMS\Backend\Utility\BackendUtility\BEgetRootLine(), and TYPO3\CMS\Core\Context\Context\setAspect().

Referenced by TYPO3\CMS\Backend\Utility\BackendUtility\getPreviewUrl().

◆ BEenableFields()

static string TYPO3\CMS\Backend\Utility\BackendUtility::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$table‪The table from which to return enableFields WHERE clause. Table name must have a 'ctrl' section in $GLOBALS['TCA'].
bool$inv‪Means that the query will select all records NOT VISIBLE records (inverted selection)
Returns
‪string WHERE clause part

should only be used from within TYPO3 Core, but DefaultRestrictionHandler is recommended as alternative

Definition at line 225 of file BackendUtility.php.

References $GLOBALS.

Referenced by TYPO3\CMS\Impexp\Controller\ExportController\exportData(), TYPO3\CMS\Extbase\Persistence\Generic\Storage\Typo3DbQueryParser\getBackendConstraintStatement(), and TYPO3\CMS\Workspaces\Service\StagesService\getBackendUsers().

◆ BEgetRootLine()

static array TYPO3\CMS\Backend\Utility\BackendUtility::BEgetRootLine (   $uid,
  $clause = '',
  $workspaceOL = false,
array  $additionalFields = [] 
)
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$uid‪Page id for which to create the root line.
string$clause‪Clause 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$workspaceOL‪If 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!
string[]$additionalFields‪Additional Fields to select for rootline records
Returns
‪array Root line array, all the way to the page tree root uid=0 (or as far as $clause allows!), including the page given as $uid

Definition at line 343 of file BackendUtility.php.

References $fields, $output, and TYPO3\CMS\Backend\Utility\BackendUtility\getPageForRootline().

Referenced by TYPO3\CMS\Backend\Configuration\TypoScript\ConditionMatching\ConditionMatcher\__construct(), TYPO3\CMS\Backend\Form\FormDataProvider\DatabasePageRootline\addData(), TYPO3\CMS\Backend\Utility\BackendUtility\ADMCMD_previewCmds(), TYPO3\CMS\Frontend\Hooks\TreelistCacheUpdateHooks\clearCacheForAllParents(), TYPO3\CMS\Core\TypoScript\ExtendedTemplateService\ext_prevPageWithTemplate(), TYPO3\CMS\Backend\Tree\Repository\PageTreeRepository\fetchAllPages(), TYPO3\CMS\Backend\Tree\Repository\PageTreeRepository\filterPagesOnMountPoints(), TYPO3\CMS\Backend\View\PageLayoutView\generateLanguageView(), TYPO3\CMS\Backend\Controller\EditDocumentController\generatePreviewCode(), TYPO3\CMS\Backend\Controller\SiteConfigurationController\getAllSitePages(), TYPO3\CMS\Info\Controller\InfoModuleController\getButtons(), TYPO3\CMS\Impexp\Controller\ImportController\getButtons(), TYPO3\CMS\Tstemplate\Controller\TypoScriptTemplateModuleController\getButtons(), TYPO3\CMS\Backend\Controller\NewRecordController\getButtons(), TYPO3\CMS\Recordlist\RecordList\DatabaseRecordList\getDocHeaderButtons(), TYPO3\CMS\Backend\Controller\Page\TreeController\getMountPointPath(), TYPO3\CMS\Backend\Tree\View\AbstractTreeView\getMountPointPath(), TYPO3\CMS\Info\Controller\InfoPageTyposcriptConfigController\getOverviewOfPagesUsingTSConfig(), TYPO3\CMS\Backend\Utility\BackendUtility\getPagesTSconfig(), TYPO3\CMS\Backend\Controller\EditDocumentController\getPreviewPageId(), TYPO3\CMS\Backend\Utility\BackendUtility\getPreviewUrl(), TYPO3\CMS\Backend\Utility\BackendUtility\getRawPagesTSconfig(), TYPO3\CMS\Backend\Controller\ContentElement\ElementInformationController\getRecordActions(), TYPO3\CMS\Backend\Utility\BackendUtility\getRecordPath(), TYPO3\CMS\Backend\View\BackendLayoutView\getRootLine(), TYPO3\CMS\Backend\Utility\BackendUtility\getViewDomain(), TYPO3\CMS\Backend\View\BackendLayout\Grid\LanguageColumn\getViewPageOnClick(), TYPO3\CMS\Core\Authentication\BackendUserAuthentication\initializeDbMountpointsInWorkspace(), TYPO3\CMS\Core\Authentication\BackendUserAuthentication\isInWebMount(), TYPO3\CMS\Info\Controller\InfoPageTyposcriptConfigController\main(), TYPO3\CMS\Backend\Controller\Page\SortSubPagesController\mainAction(), TYPO3\CMS\Backend\Controller\Page\NewMultiplePagesController\mainAction(), TYPO3\CMS\Tstemplate\Controller\TypoScriptTemplateModuleController\mainAction(), TYPO3\CMS\Backend\Controller\PageLayoutController\makeButtons(), TYPO3\CMS\Backend\Utility\BackendUtility\openPageTree(), TYPO3\CMS\Info\Controller\PageInformationController\pages_drawItem(), TYPO3\CMS\Backend\Middleware\SiteResolver\process(), TYPO3\CMS\Backend\Controller\EditDocumentController\registerViewButtonToButtonBar(), and TYPO3\CMS\Core\DataHandling\SlugHelper\resolveParentPageRecord().

◆ blindGroupNames()

static array TYPO3\CMS\Backend\Utility\BackendUtility::blindGroupNames (   $groups,
  $groupArray,
  $excludeBlindedFlag = false 
)
static

Corresponds to blindUserNames but works for groups instead

Parameters
array$groups‪Group names
array$groupArray‪Group names (reference)
bool$excludeBlindedFlag‪If $excludeBlindedFlag is set, then these records are unset from the array $usernames
Returns
‪array

Definition at line 936 of file BackendUtility.php.

◆ blindUserNames()

static array TYPO3\CMS\Backend\Utility\BackendUtility::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 \TYPO3\CMS\Backend\Utility\BackendUtility::getUserNames()) and a $groupArray (array with the groups a certain user is member of) as input

Parameters
array$usernames‪User names
array$groupArray‪Group names
bool$excludeBlindedFlag‪If $excludeBlindedFlag is set, then these records are unset from the array $usernames
Returns
‪array User names, blinded

Definition at line 901 of file BackendUtility.php.

◆ buildScriptUrl()

static string TYPO3\CMS\Backend\Utility\BackendUtility::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$addParams‪Additional parameters to pass to the script.
string$script‪The script to send the &id to, if empty it's automatically found
Returns
‪string The complete script URL

Definition at line 2770 of file BackendUtility.php.

References TYPO3\CMS\Core\Utility\PathUtility\basename(), TYPO3\CMS\Core\Utility\HttpUtility\buildQueryString(), and TYPO3\CMS\Core\Core\Environment\getCurrentScript().

Referenced by TYPO3\CMS\Backend\Utility\BackendUtility\getDropdownMenu(), TYPO3\CMS\Backend\Utility\BackendUtility\getFuncCheck(), TYPO3\CMS\Backend\Utility\BackendUtility\getFuncInput(), and TYPO3\CMS\Backend\Utility\BackendUtility\getFuncMenu().

◆ calcAge()

static string TYPO3\CMS\Backend\Utility\BackendUtility::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$seconds‪Seconds could be the difference of a certain timestamp and time()
string$labels‪Labels 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:core/Resources/Private/Language/locallang_core.xlf:labels.minutesHoursDaysYears")
Returns
‪string Formatted time

Definition at line 1017 of file BackendUtility.php.

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

Referenced by TYPO3\CMS\Backend\Tests\Unit\Utility\BackendUtilityTest\calcAgeReturnsExpectedValues(), TYPO3\CMS\Backend\Utility\BackendUtility\dateTimeAge(), TYPO3\CMS\Backend\Controller\ContentElement\ElementHistoryController\displayHistory(), TYPO3\CMS\Backend\Form\Element\AbstractFormElement\formatValue(), TYPO3\CMS\Scheduler\SystemInformation\ToolbarItemProvider\getItem(), TYPO3\CMS\Backend\Form\FormDataProvider\TcaRecordTitle\getRecordTitleForInputType(), and TYPO3\CMS\Extensionmanager\Controller\UpdateFromTerController\updateExtensionListFromTerAction().

◆ cshItem()

static string TYPO3\CMS\Backend\Utility\BackendUtility::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$table‪Table name ('MOD'+module name)
string$field‪Field name (CSH locallang main key)
string$_‪(unused)
string$wrap‪Wrap code for icon-mode, splitted by "|". Not used for full-text mode.
Returns
‪string HTML content for help text

Definition at line 2306 of file BackendUtility.php.

References $GLOBALS, $output, and TYPO3\CMS\Backend\Utility\BackendUtility\wrapInHelp().

Referenced by TYPO3\CMS\Backend\Controller\NewRecordController\getButtons(), TYPO3\CMS\Beuser\Controller\PermissionController\indexAction(), TYPO3\CMS\Info\Controller\InfoPageTyposcriptConfigController\main(), TYPO3\CMS\Info\Controller\TranslationStatusController\main(), TYPO3\CMS\Info\Controller\PageInformationController\main(), TYPO3\CMS\Filelist\Controller\File\CreateFolderController\main(), TYPO3\CMS\Backend\Template\Components\Buttons\Action\HelpButton\render(), and TYPO3\CMS\Fluid\ViewHelpers\Be\Buttons\CshViewHelper\renderStatic().

◆ date()

◆ datetime()

◆ dateTimeAge()

static string TYPO3\CMS\Backend\Utility\BackendUtility::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$tstamp‪Time stamp, seconds
int$prefix‪1/-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 1047 of file BackendUtility.php.

References $GLOBALS, and TYPO3\CMS\Backend\Utility\BackendUtility\calcAge().

Referenced by TYPO3\CMS\Backend\Tests\Unit\Utility\BackendUtilityTest\dateTimeAgeReturnsCorrectValues(), and TYPO3\CMS\Backend\Utility\BackendUtility\titleAttribForPages().

◆ daysUntil()

static int TYPO3\CMS\Backend\Utility\BackendUtility::daysUntil (   $tstamp)
static

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

Parameters
int$tstamp‪Time stamp, seconds
Returns
‪int

Definition at line 966 of file BackendUtility.php.

References $GLOBALS.

Referenced by TYPO3\CMS\Backend\Utility\BackendUtility\getRecordIconAltText().

◆ editOnClick()

static string TYPO3\CMS\Backend\Utility\BackendUtility::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$params‪Parameters 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$requestUri‪An optional returnUrl you can set - automatically set to REQUEST_URI.
Returns
‪string
Deprecated:
‪will be removed in TYPO3 v11.

Definition at line 2334 of file BackendUtility.php.

◆ explodeSoftRefParserList()

static array bool TYPO3\CMS\Backend\Utility\BackendUtility::explodeSoftRefParserList (   $parserList)
static

Returns array of soft parser references

Parameters
string$parserList‪softRef 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
Exceptions

Definition at line 3252 of file BackendUtility.php.

References $output, TYPO3\CMS\Backend\Utility\BackendUtility\getRuntimeCache(), and TYPO3\CMS\Core\Utility\GeneralUtility\trimExplode().

Referenced by TYPO3\CMS\Linkvalidator\LinkAnalyzer\analyzeRecord(), TYPO3\CMS\Core\Database\ReferenceIndex\getRelations(), and TYPO3\CMS\Core\Database\ReferenceIndex\getRelations_flexFormCallBack().

◆ fixVersioningPid()

static TYPO3\CMS\Backend\Utility\BackendUtility::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$table‪Table name
array$rr‪Record array passed by reference. As minimum, "pid" and "uid" fields must exist! "t3ver_oid", "t3ver_state" and "t3ver_wsid" is nice and will save you a DB query.
bool$ignoreWorkspaceMatch‪Ignore workspace match
See also
PageRepository::fixVersioningPid()

should only be used from within TYPO3 Core

Definition at line 3511 of file BackendUtility.php.

References TYPO3\CMS\Backend\Utility\BackendUtility\getRecord(), TYPO3\CMS\Core\Utility\ExtensionManagementUtility\isLoaded(), and TYPO3\CMS\Core\Versioning\VersionState\MOVE_POINTER.

Referenced by TYPO3\CMS\Backend\Form\FormDataProvider\DatabaseEditRow\addData(), TYPO3\CMS\Recycler\Utility\RecyclerUtility\checkAccess(), TYPO3\CMS\Backend\Controller\Wizard\AbstractWizardController\checkEditAccess(), TYPO3\CMS\Core\DataHandling\DataHandler\destNotInsideSelf(), TYPO3\CMS\Core\DataHandling\DataHandler\fillInFieldArray(), TYPO3\CMS\Workspaces\Notification\StageChangeNotification\findFirstPageId(), TYPO3\CMS\Backend\Tests\Unit\Utility\BackendUtilityTest\fixVersioningPidDoesNotChangeValuesForNoBeUserAvailable(), TYPO3\CMS\Core\Configuration\FlexForm\FlexFormTools\getDataStructureIdentifierFromRecord(), TYPO3\CMS\Backend\Utility\BackendUtility\getPageForRootline(), TYPO3\CMS\Recycler\Utility\RecyclerUtility\getRecordPath(), TYPO3\CMS\Core\DataHandling\DataHandler\getRecordPropertiesFromRow(), TYPO3\CMS\Backend\Utility\BackendUtility\getTCEFORM_TSconfig(), TYPO3\CMS\Backend\Controller\ContentElement\ElementInformationController\makeRef(), TYPO3\CMS\Backend\Controller\ContentElement\ElementInformationController\makeRefFrom(), TYPO3\CMS\Backend\Utility\BackendUtility\readPageAccess(), and TYPO3\CMS\Core\DataHandling\DataHandler\recordInfoWithPermissionCheck().

◆ getBackendScript()

static string TYPO3\CMS\Backend\Utility\BackendUtility::getBackendScript (   $interface = '')
static

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

Parameters
string$interface‪Name 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.

should only be used from within TYPO3 Core

Definition at line 3999 of file BackendUtility.php.

◆ getBackendUserAuthentication()

static BackendUserAuthentication null TYPO3\CMS\Backend\Utility\BackendUtility::getBackendUserAuthentication ( )
staticprotected
Returns
‪BackendUserAuthentication|null

Definition at line 4105 of file BackendUtility.php.

References $GLOBALS.

◆ getCommonSelectFields()

static string TYPO3\CMS\Backend\Utility\BackendUtility::getCommonSelectFields (   $table,
  $prefix = '',
  $fields = [] 
)
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$table‪Table name, present in $GLOBALS['TCA']
string$prefix‪Table prefix
array$fields‪Preset fields (must include prefix if that is used)
Returns
‪string List of fields.

should only be used from within TYPO3 Core

Definition at line 2136 of file BackendUtility.php.

References $fields, $GLOBALS, and TYPO3\CMS\Core\Utility\GeneralUtility\trimExplode().

Referenced by TYPO3\CMS\Backend\Form\FormDataProvider\AbstractItemProvider\buildForeignTableQueryBuilder(), TYPO3\CMS\Lowlevel\Integrity\DatabaseIntegrityCheck\genTree_records(), and TYPO3\CMS\Backend\Tests\Unit\Utility\BackendUtilityTest\getCommonSelectFieldsReturnsCorrectFields().

◆ getConnectionForTable()

static Connection TYPO3\CMS\Backend\Utility\BackendUtility::getConnectionForTable (   $table)
staticprotected
Parameters
string$table
Returns
‪Connection

Definition at line 4072 of file BackendUtility.php.

◆ getDropdownMenu()

static string TYPO3\CMS\Backend\Utility\BackendUtility::getDropdownMenu (   $mainParams,
  $elementName,
  $currentValue,
  $menuItems,
  $script = '',
  $addParams = '' 
)
static

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

Parameters
mixed$mainParams‪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$elementName‪The form elements name, probably something like "SET[...]
string$currentValue‪The value to be selected currently.
array$menuItems‪An array with the menu items for the selector box
string$script‪The script to send the &id to, if empty it's automatically found
string$addParams‪Additional parameters to pass to the script.
Returns
‪string HTML code for selector box

Definition at line 2653 of file BackendUtility.php.

References TYPO3\CMS\Backend\Utility\BackendUtility\buildScriptUrl(), and TYPO3\CMS\Core\Utility\GeneralUtility\camelCaseToLowerCaseUnderscored().

Referenced by TYPO3\CMS\Lowlevel\Controller\DatabaseIntegrityController\func_search(), TYPO3\CMS\Info\Controller\InfoPageTyposcriptConfigController\main(), TYPO3\CMS\Info\Controller\TranslationStatusController\main(), TYPO3\CMS\Info\Controller\PageInformationController\main(), TYPO3\CMS\Tstemplate\Controller\TypoScriptTemplateConstantEditorModuleFunctionController\main(), and TYPO3\CMS\Tstemplate\Controller\TypoScriptTemplateObjectBrowserModuleFunctionController\main().

◆ getFuncCheck()

static string TYPO3\CMS\Backend\Utility\BackendUtility::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$elementName‪The form elements name, probably something like "SET[...]
string$currentValue‪The value to be selected currently.
string$script‪The script to send the &id to, if empty it's automatically found
string$addParams‪Additional parameters to pass to the script.
string$tagParams‪Additional attributes for the checkbox input tag
Returns
‪string HTML code for checkbox
See also
getFuncMenu()

Definition at line 2709 of file BackendUtility.php.

References TYPO3\CMS\Backend\Utility\BackendUtility\buildScriptUrl().

Referenced by TYPO3\CMS\Filelist\Controller\FileListController\buildListOptionCheckboxes(), TYPO3\CMS\Lowlevel\Controller\DatabaseIntegrityController\func_search(), TYPO3\CMS\Recordlist\Browser\FileBrowser\getBulkSelector(), TYPO3\CMS\Backend\Tests\Unit\Utility\BackendUtilityTest\getFuncCheckReturnsInputTagWithValueAttribute(), TYPO3\CMS\Filelist\Controller\FileListController\indexAction(), TYPO3\CMS\Info\Controller\InfoPageTyposcriptConfigController\main(), TYPO3\CMS\Tstemplate\Controller\TemplateAnalyzerModuleFunctionController\main(), TYPO3\CMS\Tstemplate\Controller\TypoScriptTemplateObjectBrowserModuleFunctionController\main(), TYPO3\CMS\Recordlist\Controller\RecordListController\main(), and TYPO3\CMS\Core\Database\QueryGenerator\makeSelectorTable().

◆ getFuncInput()

static string TYPO3\CMS\Backend\Utility\BackendUtility::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$elementName‪The form elements name, probably something like "SET[...]
string$currentValue‪The value to be selected currently.
int$size‪Relative size of input field, max is 48
string$script‪The script to send the &id to, if empty it's automatically found
string$addParams‪Additional parameters to pass to the script.
Returns
‪string HTML code for input text field.
See also
getFuncMenu()

Definition at line 2749 of file BackendUtility.php.

References TYPO3\CMS\Backend\Utility\BackendUtility\buildScriptUrl().

◆ getFuncMenu()

static string TYPO3\CMS\Backend\Utility\BackendUtility::getFuncMenu (   $mainParams,
  $elementName,
  $currentValue,
  $menuItems,
  $script = '',
  $addParams = '' 
)
static

Returns a selector box "function menu" for a module

Parameters
mixed$mainParams‪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$elementName‪The form elements name, probably something like "SET[...]
string$currentValue‪The value to be selected currently.
array$menuItems‪An array with the menu items for the selector box
string$script‪The script to send the &id to, if empty it's automatically found
string$addParams‪Additional parameters to pass to the script.
Returns
‪string HTML code for selector box

Definition at line 2599 of file BackendUtility.php.

References TYPO3\CMS\Backend\Utility\BackendUtility\buildScriptUrl(), and TYPO3\CMS\Core\Utility\GeneralUtility\camelCaseToLowerCaseUnderscored().

Referenced by TYPO3\CMS\Tstemplate\Controller\TypoScriptTemplateModuleController\templateMenu().

◆ getGroupNames()

static array TYPO3\CMS\Backend\Utility\BackendUtility::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$fields‪Field list
string$where‪WHERE clause
Returns
‪array

should only be used from within TYPO3 Core, use a direct SQL query instead to ensure proper DBAL where statements

Definition at line 836 of file BackendUtility.php.

References $fields, TYPO3\CMS\Backend\Utility\BackendUtility\getRecordsSortedByTitle(), and TYPO3\CMS\Core\Utility\GeneralUtility\trimExplode().

Referenced by TYPO3\CMS\Belog\Controller\BackendLogController\createUserAndGroupListForSelectOptions(), TYPO3\CMS\Beuser\Controller\PermissionAjaxController\dispatch(), TYPO3\CMS\Beuser\Controller\PermissionController\editAction(), TYPO3\CMS\Beuser\Controller\PermissionController\indexAction(), and TYPO3\CMS\Beuser\Controller\PermissionAjaxController\renderGroupSelector().

◆ getItemLabel()

static string TYPO3\CMS\Backend\Utility\BackendUtility::getItemLabel (   $table,
  $col 
)
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$table‪Table name, present in $GLOBALS['TCA']
string$col‪Field name
Returns
‪string or NULL if $col is not found in the TCA table

Definition at line 1521 of file BackendUtility.php.

References $GLOBALS.

Referenced by TYPO3\CMS\Core\DataHandling\DataHandler\checkValueForCheck(), TYPO3\CMS\Backend\Controller\ContentElement\ElementHistoryController\displayHistory(), TYPO3\CMS\Recordlist\RecordList\DatabaseRecordList\fieldSelectBox(), TYPO3\CMS\Workspaces\Service\HistoryService\getDifferences(), TYPO3\CMS\Backend\Controller\ContentElement\ElementInformationController\getPropertiesForTable(), TYPO3\CMS\Workspaces\Controller\Remote\RemoteServer\getRowDetails(), TYPO3\CMS\Info\Controller\PageInformationController\getTable_pages(), TYPO3\CMS\Backend\Controller\ContentElement\ElementHistoryController\renderDiff(), TYPO3\CMS\Recordlist\RecordList\DatabaseRecordList\renderListHeader(), and TYPO3\CMS\Backend\Preview\StandardContentPreviewRenderer\renderPageModulePreviewContent().

◆ getLabelFromItemlist()

static string TYPO3\CMS\Backend\Utility\BackendUtility::getLabelFromItemlist (   $table,
  $col,
  $key 
)
static

◆ getLabelFromItemListMerged()

static string TYPO3\CMS\Backend\Utility\BackendUtility::getLabelFromItemListMerged (   $pageId,
  $table,
  $column,
  $key 
)
static

Return the label of a field by additionally checking TsConfig values

Parameters
int$pageId‪Page id
string$table‪Table name
string$column‪Field Name
string$key‪item value
Returns
‪string Label for item entry

Definition at line 1434 of file BackendUtility.php.

References TYPO3\CMS\Backend\Utility\BackendUtility\getLabelFromItemlist().

Referenced by TYPO3\CMS\Backend\Tests\Unit\Utility\BackendUtilityTest\getLabelFromItemListMergedReturnsCorrectFields(), TYPO3\CMS\Backend\View\PageLayoutView\renderContentElementPreview(), and TYPO3\CMS\Backend\Preview\StandardContentPreviewRenderer\renderPageModulePreviewContent().

◆ getLabelsFromItemsList()

static string TYPO3\CMS\Backend\Utility\BackendUtility::getLabelsFromItemsList (   $table,
  $column,
  $keyList,
array  $columnTsConfig = [] 
)
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$table‪Table name, present in TCA
string$column‪Field name
string$keyList‪Key or comma-separated list of keys.
array$columnTsConfig‪page TSConfig for $column (TCEMAIN.
‪<column>)
Returns
‪string Comma-separated list of localized labels

Definition at line 1472 of file BackendUtility.php.

References $GLOBALS, and TYPO3\CMS\Core\Utility\GeneralUtility\trimExplode().

Referenced by TYPO3\CMS\Backend\Tests\Unit\Utility\BackendUtilityTest\getLabelsFromItemsListReturnsCorrectValue(), and TYPO3\CMS\Backend\Utility\BackendUtility\getProcessedValue().

◆ getLanguageService()

static LanguageService TYPO3\CMS\Backend\Utility\BackendUtility::getLanguageService ( )
staticprotected
Returns
‪LanguageService

Definition at line 4097 of file BackendUtility.php.

References $GLOBALS.

◆ getLinkToDataHandlerAction()

static string TYPO3\CMS\Backend\Utility\BackendUtility::getLinkToDataHandlerAction (   $parameters,
  $redirectUrl = '' 
)
static

Returns a URL with a command to TYPO3 Datahandler

Parameters
string$parameters‪Set 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$redirectUrl‪Redirect URL, default is to use GeneralUtility::getIndpEnv('REQUEST_URI'), -1 means to generate an URL for JavaScript using T3_THIS_LOCATION
Returns
‪string

Definition at line 2539 of file BackendUtility.php.

Referenced by TYPO3\CMS\Filelist\FileList\formatFileList(), TYPO3\CMS\Backend\View\BackendLayout\Grid\GridColumnItem\getDeleteUrl(), TYPO3\CMS\Backend\View\PageLayoutContext\getNewLanguageOptions(), TYPO3\CMS\Backend\View\BackendLayout\Grid\GridColumnItem\getVisibilityToggleUrl(), TYPO3\CMS\Recordlist\Controller\RecordListController\languageSelector(), TYPO3\CMS\Backend\View\PageLayoutView\languageSelector(), TYPO3\CMS\Backend\Controller\EditDocumentController\languageSwitch(), TYPO3\CMS\Recordlist\RecordList\DatabaseRecordList\makeControl(), TYPO3\CMS\Recordlist\RecordList\DatabaseRecordList\makeLocalizationPanel(), and TYPO3\CMS\Backend\View\PageLayoutView\tt_content_drawHeader().

◆ getLiveVersionIdOfRecord()

◆ getLiveVersionOfRecord()

static array null TYPO3\CMS\Backend\Utility\BackendUtility::getLiveVersionOfRecord (   $table,
  $uid,
  $fields = '*' 
)
static

◆ getLogger()

static LoggerInterface TYPO3\CMS\Backend\Utility\BackendUtility::getLogger ( )
staticprotected
Returns
‪LoggerInterface

Definition at line 4089 of file BackendUtility.php.

Referenced by TYPO3\CMS\Backend\Utility\BackendUtility\resolveFileReferences().

◆ getModuleData()

static array TYPO3\CMS\Backend\Utility\BackendUtility::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

Parameters
array$MOD_MENU‪MOD_MENU is an array that defines the options in menus.
array$CHANGED_SETTINGS‪CHANGED_SETTINGS represents the array used when passing values to the script from the menus.
string$modName‪modName is the name of this module. Used to get the correct module data.
string$type‪If 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$dontValidateList‪dontValidateList 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$setDefaultList‪List of default values from $MOD_MENU to set in the output array (only if the values from MOD_MENU are not arrays)
Exceptions

Definition at line 2893 of file BackendUtility.php.

Referenced by TYPO3\CMS\Info\Controller\InfoModuleController\checkExtObj(), TYPO3\CMS\Tstemplate\Controller\TypoScriptTemplateModuleController\checkExtObj(), TYPO3\CMS\Recordlist\Browser\FileBrowser\getBulkSelector(), TYPO3\CMS\Recordlist\Controller\RecordListController\init(), TYPO3\CMS\Tstemplate\Controller\TypoScriptTemplateConstantEditorModuleFunctionController\main(), TYPO3\CMS\Scheduler\Controller\SchedulerModuleController\mainAction(), TYPO3\CMS\Lowlevel\Controller\DatabaseIntegrityController\menuConfig(), TYPO3\CMS\Backend\Controller\PageLayoutController\menuConfig(), TYPO3\CMS\Filelist\Controller\FileListController\menuConfig(), TYPO3\CMS\Info\Controller\InfoModuleController\menuConfig(), TYPO3\CMS\Tstemplate\Controller\TypoScriptTemplateModuleController\menuConfig(), TYPO3\CMS\Core\Database\QueryView\procesStoreControl(), TYPO3\CMS\Recordlist\Browser\FileBrowser\render(), and TYPO3\CMS\Tstemplate\Controller\TypoScriptTemplateModuleController\templateMenu().

◆ getMovePlaceholder()

◆ getNoRecordTitle()

static string TYPO3\CMS\Backend\Utility\BackendUtility::getNoRecordTitle (   $prep = false)
static

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

Parameters
bool$prep‪Wrap result in |
Returns
‪string Localized [No title] string

Definition at line 1635 of file BackendUtility.php.

Referenced by TYPO3\CMS\Backend\Utility\BackendUtility\getRecordTitle().

◆ getPageForRootline()

static array TYPO3\CMS\Backend\Utility\BackendUtility::getPageForRootline (   $uid,
  $clause,
  $workspaceOL,
array  $additionalFields = [] 
)
staticprotected

Gets the cached page record for the rootline

Parameters
int$uid‪Page id for which to create the root line.
string$clause‪Clause 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$workspaceOL‪If 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!
string[]$additionalFields‪AdditionalFields to fetch from the root line
Returns
‪array Cached page record for the rootline
See also
BEgetRootLine

Definition at line 418 of file BackendUtility.php.

References TYPO3\CMS\Backend\Utility\BackendUtility\fixVersioningPid(), TYPO3\CMS\Backend\Utility\BackendUtility\getMovePlaceholder(), TYPO3\CMS\Core\Versioning\VersionState\MOVE_POINTER, TYPO3\CMS\Core\Database\Query\QueryHelper\stripLogicalOperatorPrefix(), and TYPO3\CMS\Backend\Utility\BackendUtility\workspaceOL().

Referenced by TYPO3\CMS\Backend\Utility\BackendUtility\BEgetRootLine().

◆ getPagesTSconfig()

static array TYPO3\CMS\Backend\Utility\BackendUtility::getPagesTSconfig (   $id)
static

Returns the Page TSconfig for page with id, $id

Parameters
int$id‪Page uid for which to create Page TSconfig
Returns
‪array Page TSconfig
See also
‪\TYPO3\CMS\Core\TypoScript\Parser\TypoScriptParser

Definition at line 698 of file BackendUtility.php.

References $parser, TYPO3\CMS\Backend\Utility\BackendUtility\BEgetRootLine(), TYPO3\CMS\Backend\Utility\BackendUtility\getRuntimeCache(), and TYPO3\CMS\Core\Utility\ArrayUtility\mergeRecursiveWithOverrule().

Referenced by TYPO3\CMS\Backend\View\BackendLayout\Grid\LanguageColumn\__construct(), TYPO3\CMS\Backend\View\BackendLayoutView\addBackendLayoutItems(), TYPO3\CMS\Backend\Form\FormDataProvider\PageTsConfig\addData(), TYPO3\CMS\Core\DataHandling\PagePermissionAssembler\applyDefaults(), TYPO3\CMS\Core\DataHandling\DataHandler\applyDefaultsForFieldArray(), TYPO3\CMS\Workspaces\Preview\PreviewUriBuilder\buildUriForElement(), TYPO3\CMS\Backend\ContextMenu\ItemProviders\RecordProvider\canOpenNewCEWizard(), TYPO3\CMS\Backend\View\PageLayoutView\checkIfTranslationsExistInLanguage(), TYPO3\CMS\Extbase\Persistence\Generic\Storage\Typo3DbBackend\clearPageCache(), TYPO3\CMS\Core\DataHandling\DataHandler\copyRecord(), TYPO3\CMS\Backend\View\Drawing\BackendLayoutRenderer\drawContent(), TYPO3\CMS\Recordlist\RecordList\DatabaseRecordList\fieldSelectBox(), TYPO3\CMS\Info\Controller\PageInformationController\fillFieldConfiguration(), TYPO3\CMS\Backend\Provider\PageTsBackendLayoutDataProvider\generatePageTsConfig(), TYPO3\CMS\Backend\Tree\View\PagePositionMap\getActionLink(), TYPO3\CMS\Backend\ContextMenu\ItemProviders\RecordProvider\getAdditionalAttributes(), TYPO3\CMS\Backend\View\PageLayoutContext\getAllowNewContent(), TYPO3\CMS\Core\Site\Entity\NullSite\getAvailableLanguages(), TYPO3\CMS\Backend\Controller\NewRecordController\getButtons(), TYPO3\CMS\Backend\View\BackendLayoutView\getColPosListItemsParsed(), TYPO3\CMS\Backend\Controller\LinkBrowserController\getConfiguration(), TYPO3\CMS\Recordlist\RecordList\DatabaseRecordList\getDocHeaderButtons(), TYPO3\CMS\Backend\View\BackendLayout\Grid\GridColumnItem\getNewContentAfterUrl(), TYPO3\CMS\Backend\View\BackendLayout\Grid\GridColumn\getNewContentUrl(), TYPO3\CMS\Backend\Tests\Unit\Utility\BackendUtilityTest\getPagesTSconfigWorksWithoutInitializedBackendUser(), TYPO3\CMS\Viewpage\Controller\ViewModuleController\getPreviewLanguages(), TYPO3\CMS\Backend\Controller\EditDocumentController\getPreviewPageId(), TYPO3\CMS\Viewpage\Controller\ViewModuleController\getPreviewPresets(), TYPO3\CMS\Backend\Controller\EditDocumentController\getPreviewUrlParameters(), TYPO3\CMS\Backend\Utility\BackendUtility\getProcessedValue(), TYPO3\CMS\Core\DataHandling\ItemProcessingService\getProcessingItems(), TYPO3\CMS\Core\Configuration\Richtext\getRtePageTsConfigOfPid(), TYPO3\CMS\Backend\Controller\PageLayoutController\getSearchBox(), TYPO3\CMS\Recordlist\RecordList\DatabaseRecordList\getSearchBox(), TYPO3\CMS\Backend\View\PageLayoutView\getTable_tt_content(), TYPO3\CMS\Viewpage\Controller\ViewModuleController\getTypeParameterIfSet(), TYPO3\CMS\Backend\Controller\Page\NewMultiplePagesController\getTypeSelectData(), TYPO3\CMS\Core\Database\SoftReferenceIndex\getTypoLinkParts(), TYPO3\CMS\Workspaces\Controller\PreviewController\handleRequest(), TYPO3\CMS\Backend\Controller\ContentElement\NewContentElementController\init(), TYPO3\CMS\Recordlist\Controller\RecordListController\init(), TYPO3\CMS\Backend\View\BackendLayout\Grid\GridColumnItem\isInconsistentLanguage(), TYPO3\CMS\Backend\Controller\EditDocumentController\isInconsistentLanguageHandlingAllowed(), TYPO3\CMS\Linkvalidator\Task\ValidatorTask\loadModTsConfig(), TYPO3\CMS\Core\DataHandling\DataHandler\localize(), TYPO3\CMS\Info\Controller\InfoPageTyposcriptConfigController\main(), TYPO3\CMS\Linkvalidator\Report\LinkValidatorReport\main(), TYPO3\CMS\Backend\Controller\PageLayoutController\mainAction(), TYPO3\CMS\Backend\Controller\PageLayoutController\makeButtons(), TYPO3\CMS\Recordlist\RecordList\DatabaseRecordList\makeControl(), TYPO3\CMS\Info\Controller\InfoModuleController\menuConfig(), TYPO3\CMS\Tstemplate\Controller\TypoScriptTemplateModuleController\menuConfig(), TYPO3\CMS\Backend\View\PageLayoutView\newLanguageButton(), TYPO3\CMS\Workspaces\Notification\StageChangeNotification\notifyStageChange(), TYPO3\CMS\Core\DataHandling\Localization\DataMapProcessor\prefixLanguageTitle(), TYPO3\CMS\Core\DataHandling\DataHandler\prepareCacheFlush(), TYPO3\CMS\Backend\Controller\EditDocumentController\registerViewButtonToButtonBar(), TYPO3\CMS\Backend\Controller\NewRecordController\renderContent(), TYPO3\CMS\Backend\Preview\StandardContentPreviewRenderer\renderContentElementPreviewFromFluidTemplate(), TYPO3\CMS\Backend\View\PageLayoutView\renderContentElementPreviewFromFluidTemplate(), TYPO3\CMS\Recordlist\RecordList\DatabaseRecordList\renderListHeader(), TYPO3\CMS\Backend\Controller\NewRecordController\renderNewRecordControls(), TYPO3\CMS\Backend\Preview\StandardContentPreviewRenderer\renderPageModulePreviewContent(), and TYPO3\CMS\Backend\Controller\Wizard\SuggestWizardController\searchAction().

◆ getPreviewUrl()

static string TYPO3\CMS\Backend\Utility\BackendUtility::getPreviewUrl (   $pageUid,
  $backPath = '',
  $rootLine = null,
  $anchorSection = '',
  $alternativeUrl = '',
  $additionalGetVars = '',
$switchFocus = true 
)
static

Returns the preview url

It will detect the correct domain name if needed and provide the link with the right back path.

Parameters
int$pageUid‪Page UID
string$backPath‪Must point back to TYPO3_mainDir (where the site is assumed to be one level above)
array | null$rootLine‪If root line is supplied the function will look for the first found domain record and use that URL instead (if found)
string$anchorSection‪Optional anchor to the URL
string$alternativeUrl‪An alternative URL that, if set, will ignore other parameters except $switchFocus: It will return the window.open command wrapped around this URL!
string$additionalGetVars‪Additional GET variables.
bool$switchFocus‪If TRUE, then the preview window will gain the focus.
Returns
‪string

Definition at line 2403 of file BackendUtility.php.

References $GLOBALS, TYPO3\CMS\Core\Routing\RouterInterface\ABSOLUTE_URL, TYPO3\CMS\Backend\Utility\BackendUtility\ADMCMD_previewCmds(), TYPO3\CMS\Backend\Utility\BackendUtility\BEgetRootLine(), TYPO3\CMS\Core\Type\Bitmask\Permission\PAGE_SHOW, and TYPO3\CMS\Backend\Utility\BackendUtility\readPageAccess().

Referenced by TYPO3\CMS\Backend\ContextMenu\ItemProviders\RecordProvider\getViewLink(), TYPO3\CMS\Backend\ContextMenu\ItemProviders\PageProvider\getViewLink(), TYPO3\CMS\Backend\Controller\EditDocumentController\registerViewButtonToButtonBar(), TYPO3\CMS\Viewpage\Controller\ViewModuleController\showAction(), and TYPO3\CMS\Backend\Utility\BackendUtility\viewOnClick().

◆ getProcessedValue()

static string null TYPO3\CMS\Backend\Utility\BackendUtility::getProcessedValue (   $table,
  $col,
  $value,
  $fixed_lgd_chars = 0,
  $defaultPassthrough = false,
  $noRecordLookup = false,
  $uid = 0,
  $forceResult = true,
  $pid = 0 
)
static

Returns a human readable output of a value from a record For instance a database record relation would be looked up to display the title-value of that record. A checkbox with a "1" value would be "Yes", etc. $table/$col is tablename and fieldname REMEMBER to pass the output through htmlspecialchars() if you output it to the browser! (To protect it from XSS attacks and be XHTML compliant)

Parameters
string$table‪Table name, present in TCA
string$col‪Field name, present in TCA
string$value‪The value of that field from a selected record
int$fixed_lgd_chars‪The max amount of characters the value may occupy
bool$defaultPassthrough‪Flag means that values for columns that has no conversion will just be pass through directly (otherwise cropped to 200 chars or returned as "N/A")
bool$noRecordLookup‪If set, no records will be looked up, UIDs are just shown.
int$uid‪Uid of the current record
bool$forceResult‪If BackendUtility::getRecordTitle is used to process the value, this parameter is forwarded.
int$pid‪Optional page uid is used to evaluate page TSConfig for the given field
Exceptions

Definition at line 1664 of file BackendUtility.php.

References $GLOBALS, TYPO3\CMS\Core\Utility\MathUtility\canBeInterpretedAsInteger(), TYPO3\CMS\Backend\Utility\BackendUtility\date(), TYPO3\CMS\Backend\Utility\BackendUtility\datetime(), TYPO3\CMS\Core\Database\Query\QueryHelper\getDateTimeFormats(), TYPO3\CMS\Backend\Utility\BackendUtility\getLabelFromItemlist(), TYPO3\CMS\Backend\Utility\BackendUtility\getLabelsFromItemsList(), TYPO3\CMS\Backend\Utility\BackendUtility\getPagesTSconfig(), TYPO3\CMS\Backend\Utility\BackendUtility\getRecordTitle(), TYPO3\CMS\Backend\Utility\BackendUtility\getRecordWSOL(), TYPO3\CMS\Backend\Utility\BackendUtility\splitTable_Uid(), and TYPO3\CMS\Core\Utility\GeneralUtility\trimExplode().

Referenced by TYPO3\CMS\Workspaces\Service\HistoryService\getDifferences(), TYPO3\CMS\Info\Controller\PageInformationController\getPagesTableFieldValue(), TYPO3\CMS\Backend\Preview\StandardContentPreviewRenderer\getProcessedValue(), TYPO3\CMS\Backend\View\PageLayoutView\getProcessedValue(), TYPO3\CMS\Backend\Tests\Unit\Utility\BackendUtilityTest\getProcessedValueDisplaysAgeForDateInputFieldsIfSettingAbsent(), TYPO3\CMS\Backend\Utility\BackendUtility\getProcessedValueExtra(), TYPO3\CMS\Backend\Tests\Unit\Utility\BackendUtilityTest\getProcessedValueForCheckWithSingleItem(), TYPO3\CMS\Backend\Tests\Unit\Utility\BackendUtilityTest\getProcessedValueForCheckWithSingleItemInvertStateDisplay(), TYPO3\CMS\Backend\Tests\Unit\Utility\BackendUtilityTest\getProcessedValueForGroup(), TYPO3\CMS\Backend\Tests\Unit\Utility\BackendUtilityTest\getProcessedValueForGroupWithMultipleAllowedTables(), TYPO3\CMS\Backend\Tests\Unit\Utility\BackendUtilityTest\getProcessedValueForGroupWithOneAllowedTable(), TYPO3\CMS\Backend\Tests\Unit\Utility\BackendUtilityTest\getProcessedValueForSelectWithMMRelation(), TYPO3\CMS\Backend\Tests\Unit\Utility\BackendUtilityTest\getProcessedValueForZeroStringIsZero(), TYPO3\CMS\Backend\Tests\Unit\Utility\BackendUtilityTest\getProcessedValueHandlesAgeDisplayCorrectly(), TYPO3\CMS\Backend\Tests\Unit\Utility\BackendUtilityTest\getProcessedValueReturnsLabelsForExistingValuesSolely(), TYPO3\CMS\Backend\Tests\Unit\Utility\BackendUtilityTest\getProcessedValueReturnsPlainValueIfItemIsNotFound(), TYPO3\CMS\Backend\Controller\ContentElement\ElementInformationController\getPropertiesForTable(), TYPO3\CMS\Backend\Utility\BackendUtility\getRecordTitle(), TYPO3\CMS\Workspaces\Controller\Remote\RemoteServer\getRowDetails(), TYPO3\CMS\Backend\View\PageLayoutView\getTable_tt_content(), TYPO3\CMS\Backend\View\BackendLayout\Grid\GridColumn\getTitle(), TYPO3\CMS\Info\Controller\PageInformationController\pages_drawItem(), TYPO3\CMS\Backend\Form\FieldWizard\OtherLanguageContent\render(), TYPO3\CMS\Backend\Form\FieldWizard\DefaultLanguageDifferences\render(), TYPO3\CMS\Backend\Controller\ContentElement\ElementHistoryController\renderDiff(), and TYPO3\CMS\Backend\Form\Element\FileInfoElement\renderFileInformationContent().

◆ getProcessedValueExtra()

static string TYPO3\CMS\Backend\Utility\BackendUtility::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$table‪Table name, present in TCA
string$fN‪Field name
string$fV‪Field value
int$fixed_lgd_chars‪The max amount of characters the value may occupy
int$uid‪Uid of the current record
bool$forceResult‪If BackendUtility::getRecordTitle is used to process the value, this parameter is forwarded.
int$pid‪Optional page uid is used to evaluate page TSConfig for the given field
Returns
‪string
See also
getProcessedValue()

Definition at line 2100 of file BackendUtility.php.

References $GLOBALS, TYPO3\CMS\Backend\Utility\BackendUtility\datetime(), TYPO3\CMS\Backend\Utility\BackendUtility\getProcessedValue(), and TYPO3\CMS\Backend\Utility\BackendUtility\getRecordPath().

Referenced by TYPO3\CMS\Backend\Controller\ContentElement\ElementInformationController\getExtraFields(), and TYPO3\CMS\Recordlist\RecordList\DatabaseRecordList\renderListRow().

◆ getQueryBuilderForTable()

static QueryBuilder TYPO3\CMS\Backend\Utility\BackendUtility::getQueryBuilderForTable (   $table)
staticprotected
Parameters
string$table
Returns
‪QueryBuilder

Definition at line 4081 of file BackendUtility.php.

◆ getRawPagesTSconfig()

static array TYPO3\CMS\Backend\Utility\BackendUtility::getRawPagesTSconfig (   $id,
array  $rootLine = null 
)
static

Returns the non-parsed Page TSconfig for page with id, $id

Parameters
int$id‪Page uid for which to create Page TSconfig
array$rootLine‪If $rootLine is an array, that is used as rootline, otherwise rootline is just calculated
Returns
‪array Non-parsed Page TSconfig

Definition at line 760 of file BackendUtility.php.

References $GLOBALS, TYPO3\CMS\Backend\Utility\BackendUtility\BEgetRootLine(), TYPO3\CMS\Core\TypoScript\Parser\TypoScriptParser\checkIncludeLines_array(), TYPO3\CMS\Core\Utility\ExtensionManagementUtility\extPath(), TYPO3\CMS\Core\Utility\PathUtility\getCanonicalPath(), TYPO3\CMS\Core\Utility\ExtensionManagementUtility\isLoaded(), and TYPO3\CMS\Core\Utility\GeneralUtility\trimExplode().

◆ getRecord()

static array null TYPO3\CMS\Backend\Utility\BackendUtility::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 some_field = 1') Will automatically check if records has been deleted and if so, not return anything. $table must be found in $GLOBALS['TCA']

Parameters
string$table‪Table name present in $GLOBALS['TCA']
int$uid‪UID of record
string$fields‪List of fields to select
string$where‪Additional WHERE clause, eg. ' AND some_field = 0'
bool$useDeleteClause‪Use the deleteClause to check if a record is deleted (default TRUE)
Returns
‪array|null Returns the row if found, otherwise NULL

Definition at line 95 of file BackendUtility.php.

References $fields, $GLOBALS, TYPO3\CMS\Core\Database\Query\QueryHelper\stripLogicalOperatorPrefix(), and TYPO3\CMS\Core\Utility\GeneralUtility\trimExplode().

Referenced by TYPO3\CMS\Backend\Http\RouteDispatcher\addAndValidateModuleConfiguration(), TYPO3\CMS\Backend\Form\FormDataProvider\SiteTcaInline\addInlineFirstPid(), TYPO3\CMS\Backend\Form\FormDataProvider\TcaInline\addInlineFirstPid(), TYPO3\CMS\Backend\Backend\Shortcut\ShortcutRepository\addShortcut(), TYPO3\CMS\Backend\FrontendBackendUserAuthentication\allowedToEdit(), TYPO3\CMS\Workspaces\DataHandler\CommandMap\applyWorkspacesSetStageBehaviour(), TYPO3\CMS\Linkvalidator\Task\ValidatorTask\buildMail(), TYPO3\CMS\Workspaces\Preview\PreviewUriBuilder\buildUriForElement(), TYPO3\CMS\Workspaces\Controller\ReviewController\canCreatePreviewLink(), TYPO3\CMS\Recordlist\LinkHandler\RecordLinkHandler\canHandleLink(), TYPO3\CMS\Recycler\Utility\RecyclerUtility\checkAccess(), TYPO3\CMS\Core\Tests\Functional\DataHandling\Regular\CheckValueTestForCheckboxes\checkBoxValueMustBeDefinedInTcaItems(), TYPO3\CMS\Core\Tests\Functional\DataHandling\Regular\CheckValueTestForCheckboxes\checkBoxValueMustComeFromItemsProcFuncIfNotDefinedInTcaItems(), TYPO3\CMS\Backend\Controller\Wizard\AbstractWizardController\checkEditAccess(), TYPO3\CMS\Workspaces\Service\IntegrityService\checkLocalization(), TYPO3\CMS\Core\Resource\Security\FileMetadataPermissionsAspect\checkModifyAccessList(), TYPO3\CMS\Backend\Tree\View\PagePositionMap\checkNewPageInPid(), TYPO3\CMS\Linkvalidator\EventListener\CheckBrokenRteLinkEventListener\checkPageLink(), TYPO3\CMS\Linkvalidator\Task\ValidatorTask\checkPageLinks(), TYPO3\CMS\Core\Resource\Security\FileMetadataPermissionsAspect\checkRecordUpdateAccess(), TYPO3\CMS\Backend\Clipboard\Clipboard\cleanCurrent(), TYPO3\CMS\Impexp\Tests\Functional\Export\PagesAndTtContentWithImagesTest\compileExportPagesAndRelatedTtContentWithImages(), TYPO3\CMS\Beuser\Service\UserInformationService\convert(), TYPO3\CMS\Core\DataHandling\DataHandler\copyMovedRecordToNewLocation(), TYPO3\CMS\IndexedSearch\Hook\CrawlerHook\crawler_execute_type4(), TYPO3\CMS\Workspaces\Dependency\ElementEntityProcessor\createClearDependentElementChildReferenceCallback(), TYPO3\CMS\Workspaces\Dependency\ElementEntityProcessor\createClearDependentElementParentReferenceCallback(), TYPO3\CMS\Core\Tests\Functional\DataHandling\DataHandler\DefaultValuesTest\defaultValueForNullTextfieldsIsConsidered(), TYPO3\CMS\Core\Tests\Functional\DataHandling\DataHandler\DefaultValuesTest\defaultValuesFromGlobalTSconfigForNewRecordsIsRespected(), TYPO3\CMS\Core\Tests\Functional\DataHandling\DataHandler\DefaultValuesTest\defaultValuesFromPageSpecificTSconfigForNewRecordsIsRespected(), TYPO3\CMS\Core\Tests\Functional\DataHandling\DataHandler\DefaultValuesTest\defaultValuesFromTCAForNewRecordsIsRespected(), TYPO3\CMS\Core\DataHandling\DataHandler\deleteAction(), TYPO3\CMS\Core\DataHandling\DataHandler\deleteRecord_procFields(), TYPO3\CMS\Core\DataHandling\DataHandler\discard(), TYPO3\CMS\Impexp\Export\export_addDBRelations(), TYPO3\CMS\Backend\Clipboard\Clipboard\exportClipElementParameters(), TYPO3\CMS\Impexp\Controller\ExportController\exportData(), TYPO3\CMS\Impexp\Tests\Functional\Export\IrreTutorialRecordsTest\exportIrreRecords(), TYPO3\CMS\Impexp\Tests\Functional\Export\PagesAndTtContentTest\exportPagesAndRelatedTtContent(), TYPO3\CMS\Install\Updates\RowUpdater\WorkspaceVersionRecordsMigration\fetchPageId(), TYPO3\CMS\Backend\Tree\Repository\PageTreeRepository\filterPagesOnMountPoints(), TYPO3\CMS\Workspaces\Hook\DataHandlerHook\findPageElementsForVersionSwap(), TYPO3\CMS\Workspaces\Hook\DataHandlerHook\findPageIdsForVersionStateChange(), TYPO3\CMS\Workspaces\Hook\DataHandlerHook\findRealPageIds(), TYPO3\CMS\Backend\Utility\BackendUtility\fixVersioningPid(), TYPO3\CMS\Core\Utility\File\ExtendedFileUtility\func_delete(), TYPO3\CMS\Workspaces\Service\GridDataService\generateDataArray(), TYPO3\CMS\Backend\Preview\StandardContentPreviewRenderer\generateListForMenuContentTypes(), TYPO3\CMS\Linkvalidator\Task\ValidatorTask\getAdditionalInformation(), TYPO3\CMS\Recycler\Controller\DeletedRecordsController\getBackendUser(), TYPO3\CMS\Backend\Controller\EditDocumentController\getButtons(), TYPO3\CMS\Workspaces\Service\WorkspaceService\getCmdArrayForPublishWS(), TYPO3\CMS\Workspaces\Controller\Remote\RemoteServer\getCommentsForRecord(), TYPO3\CMS\Backend\Controller\LinkBrowserController\getCurrentPageId(), TYPO3\CMS\Backend\Form\FormDataProvider\DatabaseRecordTypeValue\getDatabaseRow(), TYPO3\CMS\Backend\Controller\EditDocumentController\getDisableDelete(), TYPO3\CMS\Backend\Search\LiveSearch\LiveSearch\getEditLink(), TYPO3\CMS\Backend\Controller\ContentElement\ElementHistoryController\getEditLockFromElement(), TYPO3\CMS\Backend\Controller\ContentElement\ElementInformationController\getExtraFields(), TYPO3\CMS\Beuser\Service\UserInformationService\getGroupInformation(), TYPO3\CMS\Backend\Controller\PageLayoutController\getHeaderFlashMessagesForCurrentPid(), TYPO3\CMS\Workspaces\Service\HistoryService\getHistoryEntry(), TYPO3\CMS\Backend\Tree\View\AbstractTreeView\getIcon(), TYPO3\CMS\Backend\Controller\EditDocumentController\getLanguages(), TYPO3\CMS\Backend\Form\Element\InputLinkElement\getLinkExplanation(), TYPO3\CMS\Workspaces\Preview\PreviewUriBuilder\getLivePageUid(), TYPO3\CMS\Backend\Utility\BackendUtility\getLiveVersionIdOfRecord(), TYPO3\CMS\Backend\Utility\BackendUtility\getLiveVersionOfRecord(), TYPO3\CMS\Backend\Tree\Repository\PageTreeRepository\getPageRecords(), TYPO3\CMS\Linkvalidator\Task\ValidatorTaskAdditionalFieldProvider\getPageTitle(), TYPO3\CMS\Workspaces\Service\WorkspaceService\getPreviewLinkLifetime(), TYPO3\CMS\Backend\Controller\EditDocumentController\getPreviewUrlParameters(), TYPO3\CMS\Core\DataHandling\DataHandler\getPreviousLocalizedRecordUid(), TYPO3\CMS\Workspaces\Service\StagesService\getPropertyOfCurrentWorkspaceStage(), TYPO3\CMS\Workspaces\Controller\Remote\ActionHandler\getRecipientList(), TYPO3\CMS\Backend\Controller\ContentElement\ElementHistoryController\getRecord(), TYPO3\CMS\Form\Controller\FormManagerController\getRecord(), TYPO3\CMS\Backend\Controller\EditDocumentController\getRecordForEdit(), TYPO3\CMS\Backend\Utility\BackendUtility\getRecordWSOL(), TYPO3\CMS\Workspaces\Controller\Remote\RemoteServer\getRowDetails(), TYPO3\CMS\Workspaces\Service\StagesService\getStageRecord(), TYPO3\CMS\Backend\View\PageLayoutView\getTable_tt_content(), TYPO3\CMS\Backend\Utility\BackendUtility\getTCAtypeValue(), TYPO3\CMS\IndexedSearch\Domain\Repository\AdministrationRepository\getTree(), TYPO3\CMS\Backend\Utility\BackendUtility\getTSconfig_pidValue(), TYPO3\CMS\Core\Database\SoftReferenceIndex\getTypoLinkParts(), TYPO3\CMS\Workspaces\Service\WorkspaceService\getWorkspaceTitle(), TYPO3\CMS\Backend\History\RecordHistory\hasPageAccess(), TYPO3\CMS\Workspaces\Controller\ReviewController\indexAction(), TYPO3\CMS\Backend\Controller\NewRecordController\init(), TYPO3\CMS\Backend\Controller\Wizard\AddController\init(), TYPO3\CMS\Beuser\Controller\PermissionController\initializeAction(), TYPO3\CMS\Backend\View\Drawing\BackendLayoutRenderer\initializeClipboard(), TYPO3\CMS\Backend\ContextMenu\ItemProviders\RecordProvider\initPermissions(), TYPO3\CMS\Backend\Backend\Shortcut\ShortcutRepository\initShortcuts(), TYPO3\CMS\Core\Tests\Functional\DataHandling\Regular\PagePermissionTest\insertPage(), TYPO3\CMS\Core\Tests\Functional\DataHandling\Regular\CheckValueTest\insertRecordWithRadioFieldValue(), TYPO3\CMS\Core\Resource\Security\FileMetadataPermissionsAspect\isAllowedToShowEditForm(), TYPO3\CMS\Core\Authentication\BackendUserAuthentication\isInWebMount(), TYPO3\CMS\Workspaces\Service\WorkspaceService\isNewPage(), TYPO3\CMS\Workspaces\Service\WorkspaceService\isPageAccessibleForCurrentUser(), TYPO3\CMS\Core\DataHandling\DataHandler\isRecordUndeletable(), TYPO3\CMS\Viewpage\Controller\ViewModuleController\isValidDoktype(), TYPO3\CMS\Backend\Controller\EditDocumentController\languageSwitch(), TYPO3\CMS\Recordlist\RecordList\DatabaseRecordList\linkWrapItems(), TYPO3\CMS\Workspaces\Domain\Model\DatabaseRecord\loadRow(), TYPO3\CMS\Core\DataHandling\DataHandler\localize(), TYPO3\CMS\Backend\Controller\Wizard\ListController\mainAction(), TYPO3\CMS\Backend\Controller\ContentElement\ElementHistoryController\mainAction(), TYPO3\CMS\Recordlist\RecordList\DatabaseRecordList\makeClip(), TYPO3\CMS\Recordlist\RecordList\DatabaseRecordList\makeControl(), TYPO3\CMS\Backend\Controller\ContentElement\ElementInformationController\makeRef(), TYPO3\CMS\Backend\Controller\ContentElement\ElementInformationController\makeRefFrom(), TYPO3\CMS\Backend\Utility\BackendUtility\movePlhOL(), TYPO3\CMS\Workspaces\Hook\DataHandlerHook\moveRecord_wsPlaceholders(), TYPO3\CMS\Workspaces\Notification\StageChangeNotification\notifyStageChange(), TYPO3\CMS\Core\DataHandling\DataHandler\placeholderShadowing(), TYPO3\CMS\Core\DataHandling\Localization\DataMapProcessor\prefixLanguageTitle(), TYPO3\CMS\Frontend\Hooks\TreelistCacheUpdateHooks\processCmdmap_postProcess(), TYPO3\CMS\Backend\Controller\EditDocumentController\processData(), TYPO3\CMS\Core\Hooks\BackendUserGroupIntegrityCheck\processDatamap_afterDatabaseOperations(), TYPO3\CMS\Frontend\Hooks\TreelistCacheUpdateHooks\processDatamap_afterDatabaseOperations(), TYPO3\CMS\IndexedSearch\Hook\CrawlerHook\processDatamap_afterDatabaseOperations(), TYPO3\CMS\Backend\Tests\Functional\Controller\EditDocumentControllerTest\processedDataDoesNotOverridePostWithDefaultValues(), TYPO3\CMS\Backend\Tests\Functional\Controller\EditDocumentControllerTest\processedDataTakesOverDefaultValues(), TYPO3\CMS\Impexp\Import\processSoftReferences(), TYPO3\CMS\Core\Database\QueryView\procesStoreControl(), TYPO3\CMS\Backend\Utility\BackendUtility\readPageAccess(), TYPO3\CMS\Redirects\Service\SlugService\rebuildSlugsForSlugChange(), TYPO3\CMS\Core\Authentication\BackendUserAuthentication\recordEditAccessInternals(), TYPO3\CMS\Backend\Controller\ContentElement\MoveElementController\renderContent(), TYPO3\CMS\Backend\View\PageLayoutView\renderContentElementPreview(), TYPO3\CMS\Backend\Form\Container\InlineRecordContainer\renderForeignRecordHeaderControl(), TYPO3\CMS\Backend\Preview\StandardContentPreviewRenderer\renderPageModulePreviewContent(), TYPO3\CMS\Form\ViewHelpers\Be\RenderContentElementPreviewViewHelper\renderStatic(), TYPO3\CMS\Backend\Controller\Wizard\TableController\renderTableWizard(), TYPO3\CMS\Core\DataHandling\DataHandler\resolveVersionedRecords(), TYPO3\CMS\Extensionmanager\Controller\ListController\saveBackendUserFilter(), TYPO3\CMS\IndexedSearch\Domain\Repository\AdministrationRepository\saveKeywords(), TYPO3\CMS\Backend\Controller\Wizard\SuggestWizardController\searchAction(), TYPO3\CMS\Core\Tests\Functional\DataHandling\Regular\CheckValueTestForSelect\selectValueMustBeDefinedInTcaItems(), TYPO3\CMS\Core\Tests\Functional\DataHandling\Regular\CheckValueTestForSelect\selectValueMustComeFromItemsProcFuncIfNotDefinedInTcaItems(), TYPO3\CMS\Backend\Utility\BackendUtility\selectVersionsOfRecord(), TYPO3\CMS\Workspaces\Controller\Remote\ActionHandler\sendToNextStageWindow(), TYPO3\CMS\Workspaces\Controller\Remote\ActionHandler\sendToPrevStageWindow(), TYPO3\CMS\Workspaces\Controller\Remote\ActionHandler\sendToSpecificStageExecute(), TYPO3\CMS\Impexp\Import\setFlexFormRelations(), TYPO3\CMS\Beuser\Controller\PermissionController\setPageInfo(), TYPO3\CMS\Backend\Controller\ContentElement\ElementHistoryController\setPagePath(), TYPO3\CMS\IndexedSearch\Controller\AdministrationController\statisticDetailsAction(), TYPO3\CMS\Backend\Controller\FormSlugAjaxController\suggestAction(), TYPO3\CMS\Beuser\Controller\BackendUserController\switchUser(), TYPO3\CMS\Workspaces\Controller\AjaxController\switchWorkspaceAction(), TYPO3\CMS\Backend\Configuration\TypoScript\ConditionMatching\ConditionMatcher\updateExpressionLanguageVariables(), TYPO3\CMS\Linkvalidator\Task\ValidatorTaskAdditionalFieldProvider\validateAdditionalFields(), TYPO3\CMS\Core\Tests\Functional\DataHandling\DataHandler\GetUniqueTranslationTest\valueOfUniqueFieldExcludedInTranslationIsIncrementedInNewOriginalRecord(), TYPO3\CMS\Core\Tests\Functional\DataHandling\DataHandler\GetUniqueTranslationTest\valueOfUniqueFieldExcludedInTranslationIsIncrementedInNewTranslatedRecord(), TYPO3\CMS\Core\Tests\Functional\DataHandling\DataHandler\GetUniqueTranslationTest\valueOfUniqueFieldExcludedInTranslationIsUntouchedInOriginalLanguage(), TYPO3\CMS\Core\Tests\Functional\DataHandling\DataHandler\GetUniqueTranslationTest\valueOfUniqueFieldExcludedInTranslationIsUntouchedInTranslation(), TYPO3\CMS\Core\DataHandling\DataHandler\version_remapMMForVersionSwap(), TYPO3\CMS\Workspaces\Hook\DataHandlerHook\version_setStage(), TYPO3\CMS\Workspaces\Hook\DataHandlerHook\version_swap(), TYPO3\CMS\Core\Authentication\BackendUserAuthentication\workspaceCannotEditOfflineVersion(), TYPO3\CMS\Core\Authentication\BackendUserAuthentication\workspaceCannotEditRecord(), TYPO3\CMS\Core\Authentication\BackendUserAuthentication\workspaceCheckStageForCurrent(), TYPO3\CMS\Backend\Utility\BackendUtility\workspaceOL(), and TYPO3\CMS\Core\Database\RelationHandler\writeForeignField().

◆ getRecordIconAltText()

static string TYPO3\CMS\Backend\Utility\BackendUtility::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$row‪Table row; $row is a row from the table, $table
string$table‪Table name
Returns
‪string

Definition at line 1357 of file BackendUtility.php.

References $GLOBALS, TYPO3\CMS\Core\Type\Enumeration\cast(), TYPO3\CMS\Backend\Utility\BackendUtility\date(), TYPO3\CMS\Backend\Utility\BackendUtility\daysUntil(), TYPO3\CMS\Core\Versioning\VersionState\DELETE_PLACEHOLDER, TYPO3\CMS\Core\Versioning\VersionState\MOVE_PLACEHOLDER, TYPO3\CMS\Core\Versioning\VersionState\MOVE_POINTER, TYPO3\CMS\Core\Versioning\VersionState\NEW_PLACEHOLDER, TYPO3\CMS\Core\Versioning\VersionState\NEW_PLACEHOLDER_VERSION, and TYPO3\CMS\Backend\Utility\BackendUtility\titleAttribForPages().

Referenced by TYPO3\CMS\Backend\Template\DocumentTemplate\getPageInfo(), TYPO3\CMS\Backend\Tree\View\PagePositionMap\getRecordHeader(), TYPO3\CMS\Backend\Utility\BackendUtility\getRecordToolTip(), TYPO3\CMS\Backend\Form\Container\InlineRecordContainer\renderForeignRecordHeader(), and TYPO3\CMS\Fluid\ViewHelpers\Be\PageInfoViewHelper\renderStatic().

◆ getRecordLocalization()

static mixed TYPO3\CMS\Backend\Utility\BackendUtility::getRecordLocalization (   $table,
  $uid,
  $language,
  $andWhereClause = '' 
)
static

Fetches the localization for a given record.

Parameters
string$table‪Table name present in $GLOBALS['TCA']
int$uid‪The uid of the record
int$language‪The uid of the language record in sys_language
string$andWhereClause‪Optional additional WHERE clause (default: '')
Returns
‪mixed Multidimensional array with selected records, empty array if none exists and FALSE if table is not localizable

Definition at line 285 of file BackendUtility.php.

References $GLOBALS, and TYPO3\CMS\Core\Database\Query\QueryHelper\stripLogicalOperatorPrefix().

Referenced by TYPO3\CMS\Core\DataHandling\DataHandler\copyRecord_processManyToMany(), TYPO3\CMS\Backend\View\PageLayoutView\generateLanguageView(), TYPO3\CMS\Core\DataHandling\DataHandler\getPreviousLocalizedRecordUid(), TYPO3\CMS\Backend\View\PageLayoutView\initialize(), TYPO3\CMS\Core\DataHandling\DataHandler\inlineLocalizeSynchronize(), TYPO3\CMS\Core\DataHandling\DataHandler\isRecordLocalized(), TYPO3\CMS\Core\DataHandling\DataHandler\localize(), TYPO3\CMS\Backend\Controller\PageLayoutController\renderContent(), TYPO3\CMS\Core\DataHandling\SlugHelper\resolveParentPageRecord(), and TYPO3\CMS\Backend\View\PageLayoutContext\setSiteLanguage().

◆ getRecordPath()

static mixed TYPO3\CMS\Backend\Utility\BackendUtility::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$uid‪Page uid for which to create record path
string$clause‪Clause is additional where clauses, eg.
int$titleLimit‪Title limit
int$fullTitleLimit‪Title 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 546 of file BackendUtility.php.

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

Referenced by TYPO3\CMS\Core\TypoScript\ExtendedTemplateService\ext_getTemplateHierarchyArr(), TYPO3\CMS\Workspaces\Service\GridDataService\generateDataArray(), TYPO3\CMS\Backend\Controller\PageLayoutController\getHeaderFlashMessagesForCurrentPid(), TYPO3\CMS\Backend\Utility\BackendUtility\getProcessedValueExtra(), TYPO3\CMS\Backend\Form\Wizard\SuggestWizardDefaultReceiver\getRecordPath(), TYPO3\CMS\Workspaces\Controller\Remote\RemoteServer\getRowDetails(), TYPO3\CMS\Backend\Controller\ContentElement\ElementInformationController\makeRef(), TYPO3\CMS\Backend\Controller\ContentElement\ElementInformationController\makeRefFrom(), TYPO3\CMS\Workspaces\Notification\StageChangeNotification\notifyStageChange(), TYPO3\CMS\Backend\Utility\BackendUtility\readPageAccess(), TYPO3\CMS\Recordlist\RecordList\DatabaseRecordList\recPath(), TYPO3\CMS\Backend\Form\Container\OuterWrapContainer\render(), TYPO3\CMS\Belog\ViewHelpers\Be\PagePathViewHelper\renderStatic(), TYPO3\CMS\Linkvalidator\Report\LinkValidatorReport\renderTableRow(), and TYPO3\CMS\Backend\Utility\BackendUtility\titleAttribForPages().

◆ getRecordsSortedByTitle()

static array TYPO3\CMS\Backend\Utility\BackendUtility::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$fields‪Fields to select
string$table‪Table name
string$titleField‪Field that will contain the record title
string$where‪Additional where clause
Returns
‪array Array of sorted records

Definition at line 857 of file BackendUtility.php.

References $fields, TYPO3\CMS\Backend\Utility\BackendUtility\getRecordTitle(), TYPO3\CMS\Core\Utility\ArrayUtility\sortArraysByKey(), and TYPO3\CMS\Core\Database\Query\QueryHelper\stripLogicalOperatorPrefix().

Referenced by TYPO3\CMS\Backend\Utility\BackendUtility\getGroupNames(), and TYPO3\CMS\Backend\Utility\BackendUtility\getUserNames().

◆ getRecordTitle()

static string TYPO3\CMS\Backend\Utility\BackendUtility::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$table‪Table name, present in TCA
array$row‪Row from table
bool$prep‪If 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$forceResult‪If set, the function always returns an output. If no value is found for the title, '[No title]' is returned (localized).
Returns
‪string

Reimplemented in TYPO3\CMS\Backend\Tests\Unit\Utility\Fixtures\ProcessedValueForGroupWithMultipleAllowedTablesFixture, TYPO3\CMS\Backend\Tests\Unit\Utility\Fixtures\ProcessedValueForGroupWithOneAllowedTableFixture, and TYPO3\CMS\Backend\Tests\Unit\Utility\Fixtures\ProcessedValueForSelectWithMMRelationFixture.

Definition at line 1541 of file BackendUtility.php.

References $GLOBALS, TYPO3\CMS\Backend\Utility\BackendUtility\getNoRecordTitle(), TYPO3\CMS\Backend\Utility\BackendUtility\getProcessedValue(), TYPO3\CMS\Backend\Utility\BackendUtility\getRecordTitlePrep(), and TYPO3\CMS\Core\Utility\GeneralUtility\trimExplode().

Referenced by TYPO3\CMS\Backend\Form\FormDataProvider\TcaGroup\addData(), TYPO3\CMS\Backend\Form\FormDataProvider\AbstractItemProvider\addItemsFromForeignTable(), TYPO3\CMS\Linkvalidator\Task\ValidatorTask\buildMail(), TYPO3\CMS\Core\Tree\TableConfiguration\DatabaseTreeDataProvider\buildRepresentationForNode(), TYPO3\CMS\Recordlist\LinkHandler\RecordLinkHandler\canHandleLink(), TYPO3\CMS\Linkvalidator\LinkAnalyzer\checkLinks(), TYPO3\CMS\Workspaces\Service\IntegrityService\checkLocalization(), TYPO3\CMS\Backend\Clipboard\Clipboard\confirmMsgText(), TYPO3\CMS\Impexp\Export\export_addRecord(), TYPO3\CMS\Workspaces\Service\GridDataService\generateDataArray(), TYPO3\CMS\Backend\Controller\ContentElement\ElementHistoryController\generateTitle(), TYPO3\CMS\Linkvalidator\Task\ValidatorTask\getAdditionalInformation(), TYPO3\CMS\Backend\Clipboard\Clipboard\getContentFromTab(), TYPO3\CMS\Backend\ContextMenu\ItemProviders\RecordProvider\getDeleteAdditionalAttributes(), TYPO3\CMS\Backend\View\BackendLayout\Grid\GridColumn\getEditUrl(), TYPO3\CMS\Backend\Controller\PageLayoutController\getHeaderFlashMessagesForCurrentPid(), TYPO3\CMS\Backend\Form\Wizard\SuggestWizardDefaultReceiver\getLabel(), TYPO3\CMS\Backend\Form\Element\InputLinkElement\getLinkExplanation(), TYPO3\CMS\Backend\Clipboard\Clipboard\getLocalizations(), TYPO3\CMS\Backend\Template\DocumentTemplate\getPageInfo(), TYPO3\CMS\Backend\Controller\PageLayoutController\getPageLinksWhereContentIsAlsoShownOn(), TYPO3\CMS\Backend\Controller\ContentElement\ElementInformationController\getPageTitle(), TYPO3\CMS\Backend\ContextMenu\ItemProviders\RecordProvider\getPasteAdditionalAttributes(), TYPO3\CMS\Backend\Utility\BackendUtility\getProcessedValue(), TYPO3\CMS\Backend\Search\LiveSearch\LiveSearch\getRecordArray(), TYPO3\CMS\Backend\Tree\View\PagePositionMap\getRecordHeader(), TYPO3\CMS\Backend\Template\Components\MetaInformation\getRecordInformations(), TYPO3\CMS\Core\DataHandling\DataHandler\getRecordPropertiesFromRow(), TYPO3\CMS\Recordlist\LinkHandler\PageLinkHandler\getRecordsOnExpandedPage(), TYPO3\CMS\Backend\Utility\BackendUtility\getRecordsSortedByTitle(), TYPO3\CMS\Form\Controller\FormManagerController\getRecordTitle(), TYPO3\CMS\Backend\Clipboard\Clipboard\getSelectedRecord(), TYPO3\CMS\Backend\View\PageLayoutView\getTable_tt_content(), TYPO3\CMS\Workspaces\Controller\ReviewController\indexAction(), TYPO3\CMS\Backend\RecordList\ElementBrowserRecordList\linkWrapItems(), TYPO3\CMS\Recordlist\RecordList\DatabaseRecordList\linkWrapItems(), TYPO3\CMS\Lowlevel\Integrity\DatabaseIntegrityCheck\lostRecords(), TYPO3\CMS\Info\Controller\InfoPageTyposcriptConfigController\main(), TYPO3\CMS\Linkvalidator\Report\LinkValidatorReport\main(), TYPO3\CMS\Impexp\Controller\ExportController\makeConfigurationForm(), TYPO3\CMS\Recordlist\RecordList\DatabaseRecordList\makeControl(), TYPO3\CMS\Backend\Controller\ContentElement\ElementInformationController\makeRef(), TYPO3\CMS\Backend\Controller\ContentElement\ElementInformationController\makeRefFrom(), TYPO3\CMS\Workspaces\Notification\StageChangeNotification\notifyStageChange(), TYPO3\CMS\Backend\Form\Container\OuterWrapContainer\render(), TYPO3\CMS\Backend\Controller\ContentElement\MoveElementController\renderContent(), TYPO3\CMS\Backend\View\PageLayoutView\renderContentElementPreview(), TYPO3\CMS\Recordlist\RecordList\DatabaseRecordList\renderListRow(), TYPO3\CMS\Backend\Preview\StandardContentPreviewRenderer\renderPageModulePreviewContent(), and TYPO3\CMS\Recycler\Controller\DeletedRecordsController\transform().

◆ getRecordTitlePrep()

static string TYPO3\CMS\Backend\Utility\BackendUtility::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$title‪The title string to be cropped
int$titleLength‪Crop 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 1614 of file BackendUtility.php.

References TYPO3\CMS\Core\Utility\MathUtility\canBeInterpretedAsInteger().

Referenced by TYPO3\CMS\Core\Resource\Service\UserFileInlineLabelService\getInlineLabel(), TYPO3\CMS\Backend\Utility\BackendUtility\getRecordTitle(), TYPO3\CMS\Backend\RecordList\ElementBrowserRecordList\linkWrapItems(), TYPO3\CMS\Backend\Form\Container\OuterWrapContainer\render(), and TYPO3\CMS\Backend\Form\Container\InlineRecordContainer\renderForeignRecordHeader().

◆ getRecordToolTip()

◆ getRecordWSOL()

static array TYPO3\CMS\Backend\Utility\BackendUtility::getRecordWSOL (   $table,
  $uid,
  $fields = '*',
  $where = '',
  $useDeleteClause = true,
  $unsetMovePointers = false 
)
static

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

Parameters
string$table‪Table name present in $GLOBALS['TCA']
int$uid‪UID of record
string$fields‪List of fields to select
string$where‪Additional WHERE clause, eg. ' AND some_field = 0'
bool$useDeleteClause‪Use the deleteClause to check if a record is deleted (default TRUE)
bool$unsetMovePointers‪If TRUE the function does not return a "pointer" row for moved records in a workspace
Returns
‪array Returns the row if found, otherwise nothing

Reimplemented in TYPO3\CMS\Backend\Tests\Unit\Utility\Fixtures\ProcessedValueForGroupWithMultipleAllowedTablesFixture, and TYPO3\CMS\Backend\Tests\Unit\Utility\Fixtures\ProcessedValueForGroupWithOneAllowedTableFixture.

Definition at line 139 of file BackendUtility.php.

References $fields, TYPO3\CMS\Backend\Utility\BackendUtility\getRecord(), and TYPO3\CMS\Backend\Utility\BackendUtility\workspaceOL().

Referenced by TYPO3\CMS\Backend\Form\FormDataProvider\TcaGroup\addData(), TYPO3\CMS\Core\Tree\TableConfiguration\DatabaseTreeDataProvider\buildRepresentationForNode(), TYPO3\CMS\Recordlist\LinkHandler\PageLinkHandler\canHandleLink(), TYPO3\CMS\Impexp\Controller\ExportController\exportData(), TYPO3\CMS\Impexp\View\ExportPageTreeView\ext_tree(), TYPO3\CMS\Recordlist\LinkHandler\PageLinkHandler\formatCurrentUrl(), TYPO3\CMS\Recordlist\RecordList\DatabaseRecordList\generateList(), TYPO3\CMS\Backend\Controller\Page\TreeController\getAllEntryPointPageTrees(), TYPO3\CMS\Backend\View\BackendLayout\DefaultDataProvider\getBackendLayout(), TYPO3\CMS\Backend\Clipboard\Clipboard\getContentFromTab(), TYPO3\CMS\Core\Resource\ResourceFactory\getFileReferenceData(), TYPO3\CMS\Backend\Controller\EditDocumentController\getLanguages(), TYPO3\CMS\Info\Controller\InfoPageTyposcriptConfigController\getList(), TYPO3\CMS\Opendocs\Backend\ToolbarItems\OpendocsToolbarItem\getMenuEntry(), TYPO3\CMS\Backend\Controller\Page\TreeController\getMountPointPath(), TYPO3\CMS\Backend\Tree\View\AbstractTreeView\getMountPointPath(), TYPO3\CMS\Backend\Configuration\TypoScript\ConditionMatching\ConditionMatcher\getPageIdByRecord(), TYPO3\CMS\Backend\Utility\BackendUtility\getProcessedValue(), TYPO3\CMS\Backend\Tree\View\AbstractTreeView\getRecord(), TYPO3\CMS\Recordlist\LinkHandler\PageLinkHandler\getRecordsOnExpandedPage(), TYPO3\CMS\Backend\Form\FormDataProvider\DatabaseLanguageRows\getRecordWorkspaceOverlay(), TYPO3\CMS\Backend\Clipboard\Clipboard\getSelectedRecord(), TYPO3\CMS\Backend\Backend\Shortcut\ShortcutRepository\getShortcutIcon(), TYPO3\CMS\Backend\Controller\BackendController\handlePageEditing(), TYPO3\CMS\Backend\Controller\ContentElement\ElementInformationController\initDatabaseRecord(), TYPO3\CMS\Backend\Controller\ContentElement\ElementInformationController\initFileOrFolderRecord(), TYPO3\CMS\Backend\ContextMenu\ItemProviders\RecordProvider\initialize(), TYPO3\CMS\Backend\View\PageLayoutView\initialize(), TYPO3\CMS\Core\DataHandling\DataHandler\inlineLocalizeSynchronize(), TYPO3\CMS\Core\DataHandling\DataHandler\isRecordLocalized(), TYPO3\CMS\Backend\Tests\Functional\Clipboard\ClipboardTest\localizationsAreResolved(), TYPO3\CMS\Core\DataHandling\DataHandler\localize(), TYPO3\CMS\Info\Controller\InfoPageTyposcriptConfigController\main(), TYPO3\CMS\Info\Controller\TranslationStatusController\main(), TYPO3\CMS\Impexp\Controller\ExportController\makeConfigurationForm(), TYPO3\CMS\Workspaces\Hook\BackendUtilityHook\makeEditForm_accessCheck(), TYPO3\CMS\Core\DataHandling\DataHandler\moveRecord_procFields(), TYPO3\CMS\Redirects\Hooks\DataHandlerSlugUpdateHook\processDatamap_preProcessFieldArray(), TYPO3\CMS\Backend\Form\Container\OuterWrapContainer\render(), TYPO3\CMS\Backend\Controller\ContentElement\MoveElementController\renderContent(), TYPO3\CMS\Recordlist\Browser\DatabaseBrowser\renderTableRecords(), TYPO3\CMS\Workspaces\Controller\AjaxController\switchWorkspaceAction(), TYPO3\CMS\Core\DataHandling\Localization\DataMapProcessor\synchronizeTranslationItem(), TYPO3\CMS\Backend\Utility\BackendUtility\titleAttribForPages(), and TYPO3\CMS\Backend\Configuration\TranslationConfigurationProvider\translationInfo().

◆ getRuntimeCache()

static FrontendInterface TYPO3\CMS\Backend\Utility\BackendUtility::getRuntimeCache ( )
staticprotected

◆ getTcaFieldConfiguration()

static array TYPO3\CMS\Backend\Utility\BackendUtility::getTcaFieldConfiguration (   $table,
  $field 
)
static

Gets the TCA configuration of a field.

Parameters
string$table‪Name of the table
string$field‪Name of the field
Returns
‪array

Definition at line 4033 of file BackendUtility.php.

References $GLOBALS.

Referenced by TYPO3\CMS\Workspaces\Dependency\ElementEntityProcessor\createNewDependentElementChildReferenceCallback(), TYPO3\CMS\Workspaces\Dependency\ElementEntityProcessor\createNewDependentElementParentReferenceCallback(), and TYPO3\CMS\Core\Resource\FileRepository\findByRelation().

◆ getTCAtypeValue()

static string TYPO3\CMS\Backend\Utility\BackendUtility::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$table‪Table name present in TCA
array$row‪Record from $table
Exceptions

Definition at line 636 of file BackendUtility.php.

References $GLOBALS, and TYPO3\CMS\Backend\Utility\BackendUtility\getRecord().

Referenced by TYPO3\CMS\Core\DataHandling\DataHandler\checkValueForText(), TYPO3\CMS\Backend\Utility\BackendUtility\getTCEFORM_TSconfig(), TYPO3\CMS\Core\DataHandling\DataHandler\resolveFieldConfigurationAndRespectColumnsOverrides(), TYPO3\CMS\Backend\Controller\Wizard\SuggestWizardController\searchAction(), and TYPO3\CMS\Backend\Controller\FormSlugAjaxController\suggestAction().

◆ getTCEFORM_TSconfig()

◆ getThumbnailUrl()

static string TYPO3\CMS\Backend\Utility\BackendUtility::getThumbnailUrl ( int  $fileId,
array  $configuration 
)
static
Parameters
int$fileId
array$configuration
Returns
‪string

Definition at line 1225 of file BackendUtility.php.

References TYPO3\CMS\Core\Resource\ProcessedFile\CONTEXT_IMAGEPREVIEW.

◆ getTSconfig_pidValue()

static int TYPO3\CMS\Backend\Utility\BackendUtility::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$table‪Table name
int$uid‪Record uid
int | string$pid‪Record pid, could be negative then pointing to a record from same table whose pid to find and return
Returns
‪int
See also
‪\TYPO3\CMS\Core\DataHandling\DataHandler::copyRecord()
‪\TYPO3\CMS\Backend\Utility\BackendUtility::getTSCpid()

Definition at line 3137 of file BackendUtility.php.

References TYPO3\CMS\Core\Utility\MathUtility\canBeInterpretedAsInteger(), and TYPO3\CMS\Backend\Utility\BackendUtility\getRecord().

Referenced by TYPO3\CMS\Core\DataHandling\DataHandler\copyL10nOverlayRecords(), TYPO3\CMS\Core\DataHandling\DataHandler\copyRecord(), and TYPO3\CMS\Backend\Utility\BackendUtility\getTSCpid().

◆ getTSCpid()

static array TYPO3\CMS\Backend\Utility\BackendUtility::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$table‪Table name
int$uid‪Record uid
int | string$pid‪Record pid
Returns
‪array Array of two integers; 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)
See also
‪\TYPO3\CMS\Core\DataHandling\DataHandler::setHistory()
‪\TYPO3\CMS\Core\DataHandling\DataHandler::process_datamap()

Definition at line 3208 of file BackendUtility.php.

References TYPO3\CMS\Core\Utility\MathUtility\canBeInterpretedAsInteger(), and TYPO3\CMS\Backend\Utility\BackendUtility\getTSconfig_pidValue().

Referenced by TYPO3\CMS\Core\DataHandling\DataHandler\deleteRecord(), TYPO3\CMS\Core\DataHandling\DataHandler\getOriginalParentOfRecord(), TYPO3\CMS\Backend\Utility\BackendUtility\getTCEFORM_TSconfig(), TYPO3\CMS\Core\DataHandling\DataHandler\localize(), TYPO3\CMS\Core\DataHandling\DataHandler\moveRecord_raw(), and TYPO3\CMS\Core\DataHandling\Localization\DataMapProcessor\prefixLanguageTitle().

◆ getTSCpidCached()

static array TYPO3\CMS\Backend\Utility\BackendUtility::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$table‪Tablename
string$uid‪UID value
string$pid‪PID 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 3184 of file BackendUtility.php.

Referenced by TYPO3\CMS\Backend\Controller\LinkBrowserController\getCurrentPageId().

◆ getUpdateSignalCode()

static string TYPO3\CMS\Backend\Utility\BackendUtility::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()

Definition at line 2824 of file BackendUtility.php.

References $GLOBALS, and TYPO3\CMS\Backend\Utility\BackendUtility\setUpdateSignal().

Referenced by TYPO3\CMS\Backend\Template\DocumentTemplate\endPage(), and TYPO3\CMS\Backend\Template\ModuleTemplate\renderContent().

◆ getUserNames()

static array TYPO3\CMS\Backend\Utility\BackendUtility::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$fields‪Optional $fields list (default: username,usergroup,usergroup_cached_list,uid) can be used to set the selected fields
string$where‪Optional $where clause (fx. "AND username='pete'") can be used to limit query
Returns
‪array

should only be used from within TYPO3 Core, use a direct SQL query instead to ensure proper DBAL where statements

Definition at line 818 of file BackendUtility.php.

References $fields, TYPO3\CMS\Backend\Utility\BackendUtility\getRecordsSortedByTitle(), and TYPO3\CMS\Core\Utility\GeneralUtility\trimExplode().

Referenced by TYPO3\CMS\Workspaces\Service\HistoryService\__construct(), TYPO3\CMS\Belog\Controller\BackendLogController\createUserAndGroupListForSelectOptions(), TYPO3\CMS\Beuser\Controller\PermissionAjaxController\dispatch(), TYPO3\CMS\Backend\Controller\ContentElement\ElementHistoryController\displayHistory(), TYPO3\CMS\Beuser\Controller\PermissionController\editAction(), TYPO3\CMS\Belog\Domain\Repository\LogEntryRepository\getBackendUsers(), TYPO3\CMS\Workspaces\Service\StagesService\getBackendUsers(), TYPO3\CMS\Beuser\Controller\PermissionController\indexAction(), TYPO3\CMS\Beuser\Controller\PermissionAjaxController\renderUserSelector(), and TYPO3\CMS\Workspaces\Service\StagesService\resolveBackendUserIds().

◆ getViewDomain()

static string TYPO3\CMS\Backend\Utility\BackendUtility::getViewDomain (   $pageId,
  $rootLine = null 
)
static

Builds the frontend view domain for a given page ID with a given root line.

Parameters
int$pageId‪The page ID to use, must be > 0
array | null$rootLine‪The root line structure to use
Returns
‪string The full domain including the protocol http:// or https://, but without the trailing '/'
Deprecated:
‪since TYPO3 v10.0, will be removed in TYPO3 v11.0. Use PageRouter instead.

Definition at line 2561 of file BackendUtility.php.

References $GLOBALS, and TYPO3\CMS\Backend\Utility\BackendUtility\BEgetRootLine().

◆ getWorkspaceVersionOfRecord()

static array bool TYPO3\CMS\Backend\Utility\BackendUtility::getWorkspaceVersionOfRecord (   $workspace,
  $table,
  $uid,
  $fields = '*' 
)
static

Select the workspace version of a record, if exists

Parameters
int$workspace‪Workspace ID
string$table‪Table name to select from
int$uid‪Record uid for which to find workspace version.
string$fields‪Field list to select
Returns
‪array|bool If found, return record, otherwise false

Definition at line 3705 of file BackendUtility.php.

References $fields, TYPO3\CMS\Core\Utility\ExtensionManagementUtility\isLoaded(), and TYPO3\CMS\Core\Utility\GeneralUtility\trimExplode().

Referenced by TYPO3\CMS\Workspaces\Dependency\ElementEntityProcessor\createNewDependentElementCallback(), TYPO3\CMS\Core\DataHandling\DataHandler\discard(), TYPO3\CMS\Workspaces\Command\WorkspaceVersionRecordsCommand\findInvalidMovePlaceholderRecords(), TYPO3\CMS\Backend\Controller\EditDocumentController\getRecordForEdit(), TYPO3\CMS\Backend\Form\FormDataProvider\TcaInline\getWorkspacedUids(), TYPO3\CMS\Backend\Controller\EditDocumentController\languageSwitch(), TYPO3\CMS\Frontend\Tests\Functional\SiteHandling\SlugLinkGeneratorTest\linkIsGeneratedForPageVersion(), TYPO3\CMS\Workspaces\Hook\DataHandlerHook\moveRecord(), TYPO3\CMS\Workspaces\Hook\DataHandlerHook\moveRecord_processFields(), TYPO3\CMS\Workspaces\Hook\DataHandlerHook\moveRecord_processFieldValue(), TYPO3\CMS\Core\DataHandling\DataHandler\moveRecord_raw(), TYPO3\CMS\Workspaces\Hook\DataHandlerHook\moveRecord_wsPlaceholders(), TYPO3\CMS\Core\DataHandling\DataHandler\process_datamap(), TYPO3\CMS\Workspaces\Hook\DataHandlerHook\processCmdmap_deleteAction(), TYPO3\CMS\Backend\Controller\EditDocumentController\processData(), TYPO3\CMS\Backend\History\RecordHistory\resolveElement(), TYPO3\CMS\Core\DataHandling\DataHandler\versionizeRecord(), TYPO3\CMS\Core\Authentication\BackendUserAuthentication\workspaceAllowAutoCreation(), TYPO3\CMS\Backend\Utility\BackendUtility\workspaceOL(), and TYPO3\CMS\Backend\Utility\BackendUtility\wsMapId().

◆ getWorkspaceWhereClause()

static string TYPO3\CMS\Backend\Utility\BackendUtility::getWorkspaceWhereClause (   $table,
  $workspaceId = null 
)
static

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

Parameters
string$table‪Table name
int$workspaceId‪Workspace ID
Returns
‪string Workspace where clause

should only be used from within TYPO3 Core

Definition at line 3805 of file BackendUtility.php.

Referenced by TYPO3\CMS\Backend\Tests\Unit\Utility\BackendUtilityTest\getWorkspaceWhereClauseReturnsEmptyIfNoBeUserIsAvailable().

◆ helpText()

static string TYPO3\CMS\Backend\Utility\BackendUtility::helpText (   $table,
  $field 
)
static

Returns CSH help text

Parameters
string$table‪Table name
string$field‪Field name
Returns
‪string HTML content for help text
See also
cshItem()

should only be used from within TYPO3 Core

Definition at line 2227 of file BackendUtility.php.

References $output, TYPO3\CMS\Backend\Utility\BackendUtility\helpTextArray(), and TYPO3\CMS\Core\Imaging\Icon\SIZE_SMALL.

Referenced by TYPO3\CMS\Backend\Utility\BackendUtility\wrapInHelp().

◆ helpTextArray()

static array TYPO3\CMS\Backend\Utility\BackendUtility::helpTextArray (   $table,
  $field 
)
static

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

Parameters
string$table‪Table name
string$field‪Field name
Returns
‪array With keys 'description' (raw, as available in locallang), 'title' (optional), 'moreInfo'

should only be used from within TYPO3 Core

Definition at line 2188 of file BackendUtility.php.

References $GLOBALS, and $output.

Referenced by TYPO3\CMS\Backend\Controller\ContextHelpAjaxController\getContextHelp(), and TYPO3\CMS\Backend\Utility\BackendUtility\helpText().

◆ isModuleSetInTBE_MODULES()

static bool TYPO3\CMS\Backend\Utility\BackendUtility::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 3287 of file BackendUtility.php.

References $GLOBALS, and TYPO3\CMS\Core\Utility\GeneralUtility\trimExplode().

Referenced by TYPO3\CMS\Workspaces\Controller\PreviewController\generateJavascript(), TYPO3\CMS\Backend\Controller\BackendController\generateJavascript(), and TYPO3\CMS\Core\Authentication\BackendUserAuthentication\modAccess().

◆ isRecordLocked()

static array bool TYPO3\CMS\Backend\Utility\BackendUtility::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$table‪Table name
int$uid‪Record uid
Returns
‪array|bool

Definition at line 3011 of file BackendUtility.php.

References $GLOBALS, and TYPO3\CMS\Backend\Utility\BackendUtility\getRuntimeCache().

Referenced by TYPO3\CMS\Backend\View\BackendLayout\Grid\GridColumnItem\getIcons(), TYPO3\CMS\Backend\Controller\EditDocumentController\makeEditForm(), TYPO3\CMS\Backend\Controller\Page\TreeController\pagesToFlatArray(), TYPO3\CMS\Backend\Form\Container\InlineRecordContainer\renderForeignRecordHeaderControl(), TYPO3\CMS\Recordlist\RecordList\DatabaseRecordList\renderListRow(), TYPO3\CMS\Backend\View\PageLayoutView\tt_content_drawHeader(), and TYPO3\CMS\Backend\View\PageTreeView\wrapIcon().

◆ isRootLevelRestrictionIgnored()

static bool TYPO3\CMS\Backend\Utility\BackendUtility::isRootLevelRestrictionIgnored (   $table)
static

◆ isTableLocalizable()

static bool TYPO3\CMS\Backend\Utility\BackendUtility::isTableLocalizable (   $table)
static

Determines whether a table is localizable and has the languageField and transOrigPointerField set in $GLOBALS['TCA'].

Parameters
string$table‪The table to check
Returns
‪bool Whether a table is localizable

Definition at line 578 of file BackendUtility.php.

References $GLOBALS.

Referenced by TYPO3\CMS\Workspaces\Preview\PreviewUriBuilder\buildUriForElement(), TYPO3\CMS\Core\Authentication\BackendUserAuthentication\checkFullLanguagesAccess(), TYPO3\CMS\Workspaces\Service\IntegrityService\checkLocalization(), TYPO3\CMS\Core\DataHandling\DataHandler\copyL10nOverlayRecords(), TYPO3\CMS\Core\DataHandling\DataHandler\copyRecord_processInline(), TYPO3\CMS\Core\DataHandling\DataHandler\copyRecord_processManyToMany(), TYPO3\CMS\Core\DataHandling\DataHandler\copySpecificPage(), TYPO3\CMS\Core\DataHandling\DataHandler\deleteL10nOverlayRecords(), TYPO3\CMS\Core\DataHandling\DataHandler\deleteSpecificPage(), TYPO3\CMS\Core\DataHandling\DataHandler\discardLocalizationOverlayRecords(), TYPO3\CMS\Core\DataHandling\DataHandler\discardSubPagesAndRecordsOnPage(), TYPO3\CMS\Core\DataHandling\Localization\DataMapProcessor\fetchDependencies(), TYPO3\CMS\Core\DataHandling\Localization\DataMapProcessor\fetchDependentIdMap(), TYPO3\CMS\Workspaces\Service\GridDataService\getLanguageValue(), TYPO3\CMS\Backend\Clipboard\Clipboard\getLocalizations(), TYPO3\CMS\Core\DataHandling\Localization\DataMapProcessor\isApplicable(), TYPO3\CMS\Workspaces\Service\WorkspaceService\isLanguageAccessibleForCurrentUser(), TYPO3\CMS\Backend\ContextMenu\ItemProviders\RecordProvider\isRecordATranslation(), TYPO3\CMS\Core\DataHandling\DataHandler\moveL10nOverlayRecords(), TYPO3\CMS\Backend\Form\Container\InlineControlContainer\render(), TYPO3\CMS\Workspaces\Service\WorkspaceService\selectAllVersionsFromPages(), TYPO3\CMS\Backend\Configuration\TranslationConfigurationProvider\translationInfo(), and TYPO3\CMS\Workspaces\Hook\DataHandlerHook\updateL10nOverlayRecordsOnPublish().

◆ isTableWorkspaceEnabled()

static bool TYPO3\CMS\Backend\Utility\BackendUtility::isTableWorkspaceEnabled (   $table)
static

Determines whether a table is enabled for workspaces.

Parameters
string$table‪Name of the table to be checked
Returns
‪bool

Definition at line 4021 of file BackendUtility.php.

References $GLOBALS.

Referenced by TYPO3\CMS\Core\DataHandling\SlugHelper\__construct(), TYPO3\CMS\Backend\Form\FormDataProvider\DatabaseEditRow\addData(), TYPO3\CMS\Tstemplate\Controller\TypoScriptTemplateModuleController\applyWorkspaceConstraint(), TYPO3\CMS\Backend\Form\FormDataProvider\AbstractItemProvider\buildForeignTableQueryBuilder(), TYPO3\CMS\Core\DataHandling\DataHandler\checkValueForFlex(), TYPO3\CMS\Core\Database\RelationHandler\convertItemArray(), TYPO3\CMS\Core\DataHandling\DataHandler\copyL10nOverlayRecords(), TYPO3\CMS\Core\DataHandling\DataHandler\copyRecord_processInline(), TYPO3\CMS\Core\DataHandling\DataHandler\copySpecificPage(), TYPO3\CMS\Lowlevel\Integrity\DatabaseIntegrityCheck\countRecords(), TYPO3\CMS\Workspaces\Dependency\ElementEntityProcessor\createNewDependentElementCallback(), TYPO3\CMS\Core\DataHandling\DataHandler\deleteL10nOverlayRecords(), TYPO3\CMS\Core\DataHandling\DataHandler\deleteSpecificPage(), TYPO3\CMS\Core\DataHandling\DataHandler\discard(), TYPO3\CMS\Core\DataHandling\DataHandler\discardSubPagesAndRecordsOnPage(), TYPO3\CMS\Workspaces\Hook\DataHandlerHook\findPageElementsForVersionStageChange(), TYPO3\CMS\Workspaces\Hook\DataHandlerHook\findPageElementsForVersionSwap(), TYPO3\CMS\Lowlevel\Command\MissingRelationsCommand\findRelationsToNonExistingRecords(), TYPO3\CMS\Workspaces\Hook\DataHandlerHook\flushWorkspaceElements(), TYPO3\CMS\Lowlevel\Integrity\DatabaseIntegrityCheck\genTree_records(), TYPO3\CMS\Workspaces\Command\WorkspaceVersionRecordsCommand\getAllVersionableTables(), TYPO3\CMS\Backend\Form\FormDataProvider\AbstractItemProvider\getLiveUid(), TYPO3\CMS\Backend\Clipboard\Clipboard\getLocalizations(), TYPO3\CMS\Workspaces\Service\WorkspaceService\getPagesWithVersionsInTable(), TYPO3\CMS\Backend\Controller\EditDocumentController\getPreviewUrlParameters(), TYPO3\CMS\Backend\Controller\EditDocumentController\getRecordForEdit(), TYPO3\CMS\Core\DataHandling\DataHandler\getRecordPropertiesFromRow(), TYPO3\CMS\Core\Database\ReferenceIndex\getRecordRawCached(), TYPO3\CMS\Core\DataHandling\DataHandler\getSortNumber(), TYPO3\CMS\Recordlist\RecordList\DatabaseRecordList\getTable(), TYPO3\CMS\Workspaces\Service\WorkspaceService\getTreeUids(), TYPO3\CMS\Backend\Form\FormDataProvider\TcaInline\getWorkspacedUids(), TYPO3\CMS\Workspaces\Service\WorkspaceService\hasPageRecordVersions(), TYPO3\CMS\Install\Updates\RowUpdater\WorkspaceVersionRecordsMigration\hasPotentialUpdateForTable(), TYPO3\CMS\Core\DataHandling\DataHandler\increaseSortingOfFollowingRecords(), TYPO3\CMS\Core\DataHandling\PlainDataResolver\isWorkspaceEnabled(), TYPO3\CMS\Backend\Controller\EditDocumentController\languageSwitch(), TYPO3\CMS\Lowlevel\Integrity\DatabaseIntegrityCheck\lostRecords(), TYPO3\CMS\Workspaces\Hook\BackendUtilityHook\makeEditForm_accessCheck(), TYPO3\CMS\Recordlist\RecordList\DatabaseRecordList\makeFieldList(), TYPO3\CMS\Backend\Form\Wizard\SuggestWizardDefaultReceiver\makeWorkspaceOverlay(), TYPO3\CMS\Workspaces\Hook\DataHandlerHook\moveRecord(), TYPO3\CMS\Workspaces\Hook\DataHandlerHook\moveRecord_processFieldValue(), TYPO3\CMS\Core\DataHandling\DataHandler\prepareCacheFlush(), TYPO3\CMS\Core\DataHandling\DataHandler\process_datamap(), TYPO3\CMS\Workspaces\Hook\DataHandlerHook\processCmdmap_deleteAction(), TYPO3\CMS\Backend\Controller\EditDocumentController\processData(), TYPO3\CMS\Core\Database\RelationHandler\purgeItemArrayHandler(), TYPO3\CMS\Core\Database\RelationHandler\readForeignField(), TYPO3\CMS\Core\Database\RelationHandler\readList(), TYPO3\CMS\Core\DataHandling\ReferenceIndexUpdater\registerForDrop(), TYPO3\CMS\Workspaces\Hook\DataHandlerHook\resetStageOfElements(), TYPO3\CMS\Extbase\Persistence\Generic\Storage\Typo3DbBackend\resolveMovedRecordsInWorkspace(), TYPO3\CMS\Workspaces\Service\WorkspaceService\selectVersionsInWorkspace(), TYPO3\CMS\Core\Database\ReferenceIndex\updateIndex(), TYPO3\CMS\Workspaces\Hook\DataHandlerHook\updateL10nOverlayRecordsOnPublish(), TYPO3\CMS\Core\Database\RelationHandler\updateRefIndex(), TYPO3\CMS\Workspaces\Hook\DataHandlerHook\version_swap(), TYPO3\CMS\Core\DataHandling\DataHandler\versionizeRecord(), TYPO3\CMS\Core\Authentication\BackendUserAuthentication\workspaceAllowAutoCreation(), TYPO3\CMS\Core\Authentication\BackendUserAuthentication\workspaceAllowLiveRecordsInPID(), TYPO3\CMS\Core\Authentication\BackendUserAuthentication\workspaceAllowsLiveEditingInTable(), TYPO3\CMS\Core\Authentication\BackendUserAuthentication\workspaceCanCreateNewRecord(), TYPO3\CMS\Core\Authentication\BackendUserAuthentication\workspaceCannotEditOfflineVersion(), TYPO3\CMS\Core\Authentication\BackendUserAuthentication\workspaceCannotEditRecord(), TYPO3\CMS\Core\Authentication\BackendUserAuthentication\workspaceCreateNewRecord(), and TYPO3\CMS\Core\Database\RelationHandler\writeForeignField().

◆ isWebMountRestrictionIgnored()

static bool TYPO3\CMS\Backend\Utility\BackendUtility::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$table‪Name of the table
Returns
‪bool

Definition at line 4050 of file BackendUtility.php.

References $GLOBALS.

Referenced by TYPO3\CMS\Core\DataHandling\DataHandler\recordInfoWithPermissionCheck().

◆ lockRecords()

static TYPO3\CMS\Backend\Utility\BackendUtility::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$table‪Table name
int$uid‪Record uid
int$pid‪Record pid

Definition at line 2967 of file BackendUtility.php.

References $GLOBALS, and if.

Referenced by TYPO3\CMS\Backend\Controller\EditDocumentController\mainAction(), TYPO3\CMS\Recordlist\Controller\RecordListController\mainAction(), and TYPO3\CMS\Backend\Controller\EditDocumentController\makeEditForm().

◆ movePlhOL()

static bool TYPO3\CMS\Backend\Utility\BackendUtility::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$table‪Table name
array$row‪Row (passed by reference) - must be online record!
Returns
‪bool TRUE if overlay is made.
See also
‪PageRepository::movePlhOl()

should only be used from within TYPO3 Core

Definition at line 3669 of file BackendUtility.php.

References TYPO3\CMS\Core\Type\Enumeration\cast(), TYPO3\CMS\Backend\Utility\BackendUtility\getRecord(), and TYPO3\CMS\Core\Versioning\VersionState\MOVE_PLACEHOLDER.

Referenced by TYPO3\CMS\Workspaces\Command\WorkspaceVersionRecordsCommand\findInvalidMovePlaceholderRecords(), and TYPO3\CMS\Backend\Utility\BackendUtility\workspaceOL().

◆ openPageTree()

static TYPO3\CMS\Backend\Utility\BackendUtility::openPageTree (   $pid,
  $clearExpansion 
)
static

Opens the page tree to the specified page id

Parameters
int$pid‪Page id.
bool$clearExpansion‪If set, then other open branches are closed.

should only be used from within TYPO3 Core

Definition at line 505 of file BackendUtility.php.

References TYPO3\CMS\Backend\Utility\BackendUtility\BEgetRootLine().

Referenced by TYPO3\CMS\Backend\Tests\Functional\Utility\BackendUtilityTest\givenPageIdCanBeExpanded(), TYPO3\CMS\Backend\Controller\BackendController\handlePageEditing(), and TYPO3\CMS\Backend\Tests\Functional\Utility\BackendUtilityTest\otherBranchesCanBeClosedWhenOpeningPage().

◆ purgeComputedPropertiesFromRecord()

static array<string,mixed> TYPO3\CMS\Backend\Utility\BackendUtility::purgeComputedPropertiesFromRecord ( array  $record)
static

Purges computed properties starting with underscore character ('_').

Parameters
array<string,mixed>‪$record
Returns
‪array<string,mixed>

should only be used from within TYPO3 Core

Definition at line 172 of file BackendUtility.php.

Referenced by TYPO3\CMS\Core\DataHandling\DataHandler\copyRecord(), and TYPO3\CMS\Backend\Tests\Unit\Utility\BackendUtilityTest\purgeComputedPropertiesFromRecordRemovesPropertiesStartingWithUnderscore().

◆ purgeComputedPropertyNames()

static array TYPO3\CMS\Backend\Utility\BackendUtility::purgeComputedPropertyNames ( array  $propertyNames)
static

Purges computed property names starting with underscore character ('_').

Parameters
array$propertyNames
Returns
‪array

should only be used from within TYPO3 Core

Definition at line 190 of file BackendUtility.php.

Referenced by TYPO3\CMS\Backend\Tests\Unit\Utility\BackendUtilityTest\purgeComputedPropertyNamesRemovesPropertiesStartingWithUnderscore().

◆ readPageAccess()

static array false TYPO3\CMS\Backend\Utility\BackendUtility::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$id‪Page uid for which to check read-access
string$perms_clause‪This is typically a value generated with static::getBackendUserAuthentication()->getPagePermsClause(1);
Returns
‪array|false Returns page record if OK, otherwise FALSE.

Definition at line 597 of file BackendUtility.php.

References TYPO3\CMS\Backend\Utility\BackendUtility\fixVersioningPid(), TYPO3\CMS\Backend\Utility\BackendUtility\getRecord(), TYPO3\CMS\Backend\Utility\BackendUtility\getRecordPath(), and TYPO3\CMS\Backend\Utility\BackendUtility\workspaceOL().

Referenced by TYPO3\CMS\Backend\Http\RouteDispatcher\addAndValidateModuleConfiguration(), TYPO3\CMS\Backend\Form\Wizard\SuggestWizardDefaultReceiver\checkRecordAccess(), TYPO3\CMS\Backend\View\PageLayoutView\createFromPageLayoutContext(), TYPO3\CMS\Backend\Search\LiveSearch\LiveSearch\getEditLink(), TYPO3\CMS\Backend\Form\Element\InputLinkElement\getLinkExplanation(), TYPO3\CMS\Backend\Utility\BackendUtility\getPreviewUrl(), TYPO3\CMS\Recycler\Controller\RecyclerModuleController\handleRequest(), TYPO3\CMS\Backend\History\RecordHistory\hasPageAccess(), TYPO3\CMS\Backend\Controller\ContentElement\NewContentElementController\init(), TYPO3\CMS\Backend\Controller\NewRecordController\init(), TYPO3\CMS\Backend\Controller\ContentElement\ElementInformationController\initDatabaseRecord(), TYPO3\CMS\Backend\View\PageLayoutView\initialize(), TYPO3\CMS\Linkvalidator\Report\LinkValidatorReport\initialize(), TYPO3\CMS\IndexedSearch\Controller\AdministrationController\initializeView(), TYPO3\CMS\Info\Controller\InfoModuleController\main(), TYPO3\CMS\Recordlist\Controller\RecordListController\main(), TYPO3\CMS\Backend\Controller\EditDocumentController\main(), TYPO3\CMS\Recordlist\Controller\ClearPageCacheController\mainAction(), TYPO3\CMS\Backend\Controller\Page\SortSubPagesController\mainAction(), TYPO3\CMS\Backend\Controller\Page\NewMultiplePagesController\mainAction(), TYPO3\CMS\Impexp\Controller\ImportController\mainAction(), TYPO3\CMS\Backend\Controller\ContentElement\ElementHistoryController\mainAction(), TYPO3\CMS\Impexp\Controller\ExportController\mainAction(), TYPO3\CMS\Backend\Controller\PageLayoutController\mainAction(), TYPO3\CMS\Tstemplate\Controller\TypoScriptTemplateModuleController\mainAction(), TYPO3\CMS\Workspaces\Hook\DataHandlerHook\moveRecord_wsPlaceholders(), TYPO3\CMS\Fluid\ViewHelpers\Be\TableListViewHelper\render(), TYPO3\CMS\Backend\Controller\ContentElement\MoveElementController\renderContent(), TYPO3\CMS\Backend\Form\Container\InlineRecordContainer\renderForeignRecordHeaderControl(), TYPO3\CMS\Fluid\ViewHelpers\Be\PagePathViewHelper\renderStatic(), TYPO3\CMS\Fluid\ViewHelpers\Be\PageInfoViewHelper\renderStatic(), TYPO3\CMS\Recordlist\Browser\DatabaseBrowser\renderTableRecords(), TYPO3\CMS\Beuser\Controller\PermissionController\setPageInfo(), and TYPO3\CMS\Backend\Controller\ContentElement\ElementHistoryController\setPagePath().

◆ referenceCount()

static string int TYPO3\CMS\Backend\Utility\BackendUtility::referenceCount (   $table,
  $ref,
  $msg = '',
  $count = null 
)
static

Counting references to a record/file

Parameters
string$table‪Table name (or "_FILE" if its a file)
string$ref‪Reference: If table, then int-uid, if _FILE, then file reference (relative to Environment::getPublicPath())
string$msg‪Message with s, eg. "There were s records pointing to this file!
string | int | null$count‪Reference count
Returns
‪string|int Output string (or int count value if no msg string specified)

Definition at line 3311 of file BackendUtility.php.

References TYPO3\CMS\Core\Core\Environment\getPublicPath(), and TYPO3\CMS\Core\Utility\PathUtility\stripPathSitePrefix().

Referenced by TYPO3\CMS\Filelist\ContextMenu\ItemProviders\FileProvider\getAdditionalAttributes(), TYPO3\CMS\Backend\ContextMenu\ItemProviders\RecordProvider\getDeleteAdditionalAttributes(), TYPO3\CMS\Recordlist\RecordList\DatabaseRecordList\makeControl(), TYPO3\CMS\Filelist\FileList\makeEdit(), TYPO3\CMS\Backend\Controller\EditDocumentController\registerDeleteButtonToButtonBar(), and TYPO3\CMS\Backend\View\PageLayoutView\tt_content_drawHeader().

◆ resolveFileReferences()

static TYPO3 CMS Core Resource FileReference [] null TYPO3\CMS\Backend\Utility\BackendUtility::resolveFileReferences (   $tableName,
  $fieldName,
  $element,
  $workspaceId = null 
)
static

Resolves file references for a given record.

Parameters
string$tableName‪Name of the table of the record
string$fieldName‪Name of the field of the record
array$element‪Record data
int | null$workspaceId‪Workspace to fetch data for
Returns
‪\TYPO3\CMS\Core\Resource\FileReference[]|null

We just catch the exception here Reasoning: There is nothing an editor or even admin could do

The storage does not exist anymore Log the exception message for admins as they maybe can restore the storage

Definition at line 1066 of file BackendUtility.php.

References $GLOBALS, and TYPO3\CMS\Backend\Utility\BackendUtility\getLogger().

Referenced by TYPO3\CMS\Workspaces\Controller\Remote\RemoteServer\getRowDetails(), TYPO3\CMS\Frontend\Hooks\PageLayoutView\TextpicPreviewRenderer\preProcess(), TYPO3\CMS\Frontend\Hooks\PageLayoutView\TextmediaPreviewRenderer\preProcess(), TYPO3\CMS\Frontend\Hooks\PageLayoutView\ImagePreviewRenderer\preProcess(), TYPO3\CMS\Backend\Tests\Unit\Utility\BackendUtilityTest\resolveFileReferencesReturnsEmptyResultForNoReferencesAvailable(), TYPO3\CMS\Backend\Tests\Unit\Utility\BackendUtilityTest\returnNullForMissingTcaConfigInResolveFileReferences(), and TYPO3\CMS\Backend\Tests\Unit\Utility\BackendUtilityTest\returnNullForUnfitTableConfigInResolveFileReferences().

◆ selectVersionsOfRecord()

static array null TYPO3\CMS\Backend\Utility\BackendUtility::selectVersionsOfRecord (   $table,
  $uid,
  $fields = '*',
  $workspace = 0,
  $includeDeletedRecords = false,
  $row = null 
)
static

Select all versions of a record, ordered by latest created version (uid DESC)

Parameters
string$table‪Table name to select from
int$uid‪Record uid for which to find versions.
string$fields‪Field 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$includeDeletedRecords‪If set, deleted-flagged versions are included! (Only for clean-up script!)
array$row‪The current record
Returns
‪array|null Array of versions of table/uid

should only be used from within TYPO3 Core

Definition at line 3416 of file BackendUtility.php.

References $fields, TYPO3\CMS\Backend\Utility\BackendUtility\getRecord(), and TYPO3\CMS\Core\Utility\GeneralUtility\trimExplode().

Referenced by TYPO3\CMS\Core\DataHandling\DataHandler\deleteVersionsForRecord(), TYPO3\CMS\Lowlevel\Command\OrphanRecordsCommand\findAllConnectedRecordsInPage(), TYPO3\CMS\Lowlevel\Command\CleanFlexFormsCommand\findAllDirtyFlexformsInPage(), TYPO3\CMS\Lowlevel\Command\DeletedRecordsCommand\findAllFlaggedRecordsInPage(), TYPO3\CMS\Workspaces\Command\WorkspaceVersionRecordsCommand\findUnusedPlaceholderRecords(), and TYPO3\CMS\Workspaces\Command\WorkspaceVersionRecordsCommand\traversePageTreeForVersionedRecords().

◆ setUpdateSignal()

static TYPO3\CMS\Backend\Utility\BackendUtility::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$set‪Key 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$params‪Additional information for the update signal, used to only refresh a branch of the tree
See also
BackendUtility::getUpdateSignalCode()

Definition at line 2798 of file BackendUtility.php.

Referenced by TYPO3\CMS\Backend\Controller\EditDocumentController\closeDocument(), TYPO3\CMS\Backend\Controller\Page\NewMultiplePagesController\createPages(), TYPO3\CMS\Workspaces\Hook\DataHandlerHook\emitUpdateTopbarSignal(), TYPO3\CMS\Backend\Utility\BackendUtility\getUpdateSignalCode(), TYPO3\CMS\Workspaces\Controller\PreviewController\handleRequest(), TYPO3\CMS\Impexp\Controller\ImportController\importData(), TYPO3\CMS\Workspaces\Controller\ReviewController\indexAction(), TYPO3\CMS\Recordlist\Controller\RecordListController\main(), TYPO3\CMS\Backend\Controller\EditDocumentController\main(), TYPO3\CMS\Backend\Controller\File\FileController\mainAction(), TYPO3\CMS\Setup\Controller\SetupModuleController\mainAction(), TYPO3\CMS\Backend\History\RecordHistoryRollback\performRollback(), TYPO3\CMS\Backend\Controller\Page\SortSubPagesController\persistNewSubPageOrder(), TYPO3\CMS\Backend\Controller\EditDocumentController\processData(), TYPO3\CMS\Backend\Controller\SimpleDataHandlerController\processRequest(), and TYPO3\CMS\Setup\Controller\SetupModuleController\storeIncomingData().

◆ softRefParserObj()

static mixed TYPO3\CMS\Backend\Utility\BackendUtility::softRefParserObj (   $spKey)
static

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

Parameters
string$spKey‪softRef parser key
Returns
‪mixed If available, returns Soft link parser object, otherwise false.

should only be used from within TYPO3 Core

Definition at line 3225 of file BackendUtility.php.

References $GLOBALS.

Referenced by TYPO3\CMS\Linkvalidator\LinkAnalyzer\analyzeRecord(), TYPO3\CMS\Core\Database\ReferenceIndex\getRelations(), and TYPO3\CMS\Core\Database\ReferenceIndex\getRelations_flexFormCallBack().

◆ splitTable_Uid()

static array TYPO3\CMS\Backend\Utility\BackendUtility::splitTable_Uid (   $str)
static

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

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

should only be used from within TYPO3 Core

Definition at line 208 of file BackendUtility.php.

Referenced by TYPO3\CMS\Core\DataHandling\Localization\DataMapItem\extractId(), TYPO3\CMS\Backend\Utility\BackendUtility\getProcessedValue(), TYPO3\CMS\Backend\View\PageLayoutView\renderContentElementPreview(), TYPO3\CMS\Backend\Preview\StandardContentPreviewRenderer\renderPageModulePreviewContent(), and TYPO3\CMS\Backend\Tests\Unit\Utility\BackendUtilityTest\splitTableUid().

◆ thumbCode()

static string TYPO3\CMS\Backend\Utility\BackendUtility::thumbCode (   $row,
  $table,
  $field,
  $backPath = '',
  $thumbScript = '',
  $uploaddir = null,
  $abs = 0,
  $tparams = '',
  $size = '',
  $linkInfoPopup = true 
)
static

Returns a linked image-tag for thumbnail(s)/fileicons/truetype-font-previews from a database row with sys_file_references All $GLOBALS['TYPO3_CONF_VARS']['GFX']['imagefile_ext'] extension are made to thumbnails + ttf file (renders font-example) Thumbnails are linked to ShowItemController (/thumbnails route)

Parameters
array$row‪Row is the database row from the table, $table.
string$table‪Table name for $row (present in TCA)
string$field‪Field is pointing to the connecting field of sys_file_references
string$backPath‪Back path prefix for image tag src="" field
string$thumbScript‪UNUSED since FAL
string$uploaddir‪UNUSED since FAL
int$abs‪UNUSED
string$tparams‪Optional: $tparams is additional attributes for the image tags
int | string$size‪Optional: $size is [w]x[h] of the thumbnail. 64 is default.
bool$linkInfoPopup‪Whether to wrap with a link opening the info popup
Returns
‪string Thumbnail image tag.

Definition at line 1137 of file BackendUtility.php.

References $GLOBALS, TYPO3\CMS\Core\Resource\ProcessedFile\CONTEXT_IMAGECROPSCALEMASK, TYPO3\CMS\Core\Resource\ProcessedFile\CONTEXT_IMAGEPREVIEW, TYPO3\CMS\Core\Imaging\ImageManipulation\CropVariantCollection\create(), and TYPO3\CMS\Core\Imaging\Icon\SIZE_SMALL.

Referenced by TYPO3\CMS\Backend\Preview\StandardContentPreviewRenderer\getThumbCodeUnlinked(), TYPO3\CMS\Backend\View\PageLayoutView\getThumbCodeUnlinked(), TYPO3\CMS\Recordlist\RecordList\DatabaseRecordList\renderListRow(), and TYPO3\CMS\Backend\View\PageLayoutView\thumbCode().

◆ time()

static string TYPO3\CMS\Backend\Utility\BackendUtility::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$value‪Time stamp, seconds
bool$withSeconds‪Output hh:mm:ss. If FALSE: hh:mm
Returns
‪string Formatted time

Definition at line 1005 of file BackendUtility.php.

Referenced by TYPO3\CMS\Backend\Form\Element\AbstractFormElement\formatValue().

◆ titleAttribForPages()

static string TYPO3\CMS\Backend\Utility\BackendUtility::titleAttribForPages (   $row,
  $perms_clause = '',
  $includeAttrib = true 
)
static

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

Parameters
array$row‪Input must be a page row ($row) with the proper fields set (be sure - send the full range of fields for the table)
string$perms_clause‪This is used to get the record path of the shortcut page, if any (and doktype==4)
bool$includeAttrib‪If $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 1244 of file BackendUtility.php.

References $GLOBALS, TYPO3\CMS\Core\Type\Enumeration\cast(), TYPO3\CMS\Backend\Utility\BackendUtility\dateTimeAge(), TYPO3\CMS\Core\Versioning\VersionState\DELETE_PLACEHOLDER, TYPO3\CMS\Core\Domain\Repository\PageRepository\DOKTYPE_LINK, TYPO3\CMS\Core\Domain\Repository\PageRepository\DOKTYPE_MOUNTPOINT, TYPO3\CMS\Core\Domain\Repository\PageRepository\DOKTYPE_SHORTCUT, TYPO3\CMS\Backend\Utility\BackendUtility\getRecordPath(), TYPO3\CMS\Backend\Utility\BackendUtility\getRecordWSOL(), TYPO3\CMS\Core\Utility\GeneralUtility\intExplode(), TYPO3\CMS\Core\Versioning\VersionState\MOVE_PLACEHOLDER, TYPO3\CMS\Core\Versioning\VersionState\MOVE_POINTER, TYPO3\CMS\Core\Versioning\VersionState\NEW_PLACEHOLDER, TYPO3\CMS\Core\Versioning\VersionState\NEW_PLACEHOLDER_VERSION, and TYPO3\CMS\Core\Domain\Repository\PageRepository\SHORTCUT_MODE_NONE.

Referenced by TYPO3\CMS\Backend\Utility\BackendUtility\getRecordIconAltText(), TYPO3\CMS\Backend\Tree\View\BrowseTreeView\getTitleAttrib(), and TYPO3\CMS\Backend\Controller\Page\TreeController\pagesToFlatArray().

◆ translationCount()

static string TYPO3\CMS\Backend\Utility\BackendUtility::translationCount (   $table,
  $ref,
  $msg = '' 
)
static

Counting translations of records

Parameters
string$table‪Table name
string$ref‪Reference: the record's uid
string$msg‪Message 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 3361 of file BackendUtility.php.

References $GLOBALS.

Referenced by TYPO3\CMS\Backend\ContextMenu\ItemProviders\RecordProvider\getDeleteAdditionalAttributes(), TYPO3\CMS\Recordlist\RecordList\DatabaseRecordList\makeControl(), TYPO3\CMS\Backend\Controller\EditDocumentController\registerDeleteButtonToButtonBar(), and TYPO3\CMS\Backend\View\PageLayoutView\tt_content_drawHeader().

◆ TYPO3_copyRightNotice()

static string TYPO3\CMS\Backend\Utility\BackendUtility::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.
Deprecated:
‪since TYPO3 v10.2, will be removed in TYPO3 v11.0

Definition at line 3907 of file BackendUtility.php.

◆ versioningPlaceholderClause()

static string TYPO3\CMS\Backend\Utility\BackendUtility::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$table‪Table name
Returns
‪string Where clause if applicable.

should only be used from within TYPO3 Core

Definition at line 3788 of file BackendUtility.php.

References TYPO3\CMS\Core\Versioning\VersionState\DEFAULT_STATE.

Referenced by TYPO3\CMS\Backend\Tests\Unit\Utility\BackendUtilityTest\versioningPlaceholderClauseReturnsEmptyIfNoBeUserIsAvailable().

◆ viewOnClick()

static string TYPO3\CMS\Backend\Utility\BackendUtility::viewOnClick (   $pageUid,
  $backPath = '',
  $rootLine = null,
  $anchorSection = '',
  $alternativeUrl = '',
  $additionalGetVars = '',
  $switchFocus = true 
)
static

Returns a JavaScript string for viewing the page id, $id It will re-use any window already open.

Parameters
int$pageUid‪Page UID
string$backPath‪Must point back to TYPO3_mainDir (where the site is assumed to be one level above)
array | null$rootLine‪If root line is supplied the function will look for the first found domain record and use that URL instead (if found)
string$anchorSection‪Optional anchor to the URL
string$alternativeUrl‪An alternative URL that, if set, will ignore other parameters except $switchFocus: It will return the window.open command wrapped around this URL!
string$additionalGetVars‪Additional GET variables.
bool$switchFocus‪If TRUE, then the preview window will gain the focus.
Returns
‪string

Definition at line 2359 of file BackendUtility.php.

References TYPO3\CMS\Backend\Utility\BackendUtility\getPreviewUrl().

Referenced by TYPO3\CMS\Workspaces\Preview\PreviewUriBuilder\buildUriForElement(), TYPO3\CMS\Backend\View\PageLayoutView\generateLanguageView(), TYPO3\CMS\Backend\Controller\EditDocumentController\generatePreviewCode(), TYPO3\CMS\Info\Controller\InfoModuleController\getButtons(), TYPO3\CMS\Impexp\Controller\ImportController\getButtons(), TYPO3\CMS\Tstemplate\Controller\TypoScriptTemplateModuleController\getButtons(), TYPO3\CMS\Backend\Controller\NewRecordController\getButtons(), TYPO3\CMS\Recordlist\RecordList\DatabaseRecordList\getDocHeaderButtons(), TYPO3\CMS\Recordlist\RecordList\DatabaseRecordList\getOnClickForRow(), TYPO3\CMS\Backend\Controller\ContentElement\ElementInformationController\getRecordActions(), TYPO3\CMS\Backend\View\BackendLayout\Grid\LanguageColumn\getViewPageOnClick(), TYPO3\CMS\Backend\Controller\Page\SortSubPagesController\mainAction(), TYPO3\CMS\Backend\Controller\Page\NewMultiplePagesController\mainAction(), TYPO3\CMS\Backend\Controller\PageLayoutController\makeButtons(), TYPO3\CMS\Info\Controller\PageInformationController\pages_drawItem(), TYPO3\CMS\Info\Controller\TranslationStatusController\renderL10nTable(), and TYPO3\CMS\Backend\Tests\Unit\Utility\BackendUtilityTest\viewOnClickReturnsOnClickCodeWithAlternativeUrl().

◆ workspaceOL()

static TYPO3\CMS\Backend\Utility\BackendUtility::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$table‪Table name
array$row‪Record 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$wsid‪Workspace ID, if not specified will use static::getBackendUserAuthentication()->workspace
bool$unsetMovePointers‪If TRUE the function does not return a "pointer" row for moved records in a workspace
See also
fixVersioningPid()

Definition at line 3586 of file BackendUtility.php.

References TYPO3\CMS\Core\Type\Enumeration\cast(), TYPO3\CMS\Backend\Utility\BackendUtility\getRecord(), TYPO3\CMS\Backend\Utility\BackendUtility\getWorkspaceVersionOfRecord(), TYPO3\CMS\Core\Utility\ExtensionManagementUtility\isLoaded(), TYPO3\CMS\Core\Versioning\VersionState\MOVE_PLACEHOLDER, TYPO3\CMS\Core\Versioning\VersionState\MOVE_POINTER, and TYPO3\CMS\Backend\Utility\BackendUtility\movePlhOL().

Referenced by TYPO3\CMS\Backend\Form\FormDataProvider\AbstractItemProvider\addItemsFromForeignTable(), TYPO3\CMS\Workspaces\Controller\ReviewController\canCreatePreviewLink(), TYPO3\CMS\Core\DataHandling\DataHandler\copyRecord(), TYPO3\CMS\Core\DataHandling\DataHandler\deleteL10nOverlayRecords(), TYPO3\CMS\Impexp\Export\export_addRecord(), TYPO3\CMS\Core\TypoScript\ExtendedTemplateService\ext_getAllTemplates(), TYPO3\CMS\Core\TypoScript\ExtendedTemplateService\ext_getFirstTemplate(), TYPO3\CMS\Core\DataHandling\DataHandler\fillInFieldArray(), TYPO3\CMS\Workspaces\Hook\DataHandlerHook\findPageElementsForVersionSwap(), TYPO3\CMS\Workspaces\Hook\DataHandlerHook\findPageIdsForVersionStateChange(), TYPO3\CMS\Backend\View\PageLayoutView\generateLanguageView(), TYPO3\CMS\Backend\Tree\View\AbstractTreeView\getDataNext(), TYPO3\CMS\Core\Configuration\FlexForm\FlexFormTools\getDataStructureIdentifierFromRecord(), TYPO3\CMS\Info\Controller\TranslationStatusController\getLangStatus(), TYPO3\CMS\Backend\View\BackendLayout\DefaultDataProvider\getLayoutData(), TYPO3\CMS\Backend\Controller\PageLayoutController\getLocalizedPageTitle(), TYPO3\CMS\Backend\View\PageLayoutView\getLocalizedPageTitle(), TYPO3\CMS\Backend\View\PageLayoutView\getNonTranslatedTTcontentUids(), TYPO3\CMS\Backend\View\BackendLayoutView\getPage(), TYPO3\CMS\Backend\Utility\BackendUtility\getPageForRootline(), TYPO3\CMS\Info\Controller\PageInformationController\getPageRecordsRecursive(), TYPO3\CMS\Backend\Search\LiveSearch\LiveSearch\getRecordArray(), TYPO3\CMS\Backend\Controller\Page\LocalizationController\getRecordLocalizeSummary(), TYPO3\CMS\Recycler\Utility\RecyclerUtility\getRecordPath(), TYPO3\CMS\Core\DataHandling\DataHandler\getRecordProperties(), TYPO3\CMS\Recordlist\LinkHandler\PageLinkHandler\getRecordsOnExpandedPage(), TYPO3\CMS\Backend\Utility\BackendUtility\getRecordWSOL(), TYPO3\CMS\Backend\View\BackendLayout\ContentFetcher\getResult(), TYPO3\CMS\Backend\View\PageLayoutView\getResult(), TYPO3\CMS\Recordlist\RecordList\DatabaseRecordList\getTable(), TYPO3\CMS\Info\Controller\PageInformationController\getTable_pages(), TYPO3\CMS\Core\DataHandling\DataHandler\inlineLocalizeSynchronize(), TYPO3\CMS\Tstemplate\Controller\TypoScriptTemplateModuleController\mainAction(), TYPO3\CMS\Backend\Controller\PageLayoutController\makeButtons(), TYPO3\CMS\Backend\Form\Wizard\SuggestWizardDefaultReceiver\makeWorkspaceOverlay(), TYPO3\CMS\Backend\Tree\View\PagePositionMap\printContentElementColumns(), TYPO3\CMS\Backend\Utility\BackendUtility\readPageAccess(), TYPO3\CMS\Core\DataHandling\DataHandler\remapListedDBRecords(), TYPO3\CMS\Core\DataHandling\SlugHelper\resolveVersionOverlays(), TYPO3\CMS\Backend\View\PageLayoutContext\setSiteLanguage(), TYPO3\CMS\Core\DataHandling\DataHandler\updateFlexFormData(), and TYPO3\CMS\Backend\Tests\Unit\Utility\BackendUtilityTest\workspaceOLDoesNotChangeValuesForNoBeUserAvailable().

◆ wrapClickMenuOnIcon()

static string TYPO3\CMS\Backend\Utility\BackendUtility::wrapClickMenuOnIcon (   $content,
  $table,
  $uid = 0,
  $context = '',
  $_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 context arguments imploded by "|": rawurlencode($table.'|'.$uid.'|'.$context)

Parameters
string$content‪String to be wrapped in link, typ. image tag.
string$table‪Table 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 | string$uid‪If icon is for database record this is the UID for the record from $table or identifier for sys_file record
string$context‪Set tree if menu is called from tree view
string$_addParams‪NOT IN USE
string$_enDisItems‪NOT IN USE
bool$returnTagParameters‪If set, will return only the onclick JavaScript, not the whole link.
Returns
‪string The link wrapped input string.

Definition at line 2510 of file BackendUtility.php.

Referenced by TYPO3\CMS\Filelist\FileList\formatDirList(), TYPO3\CMS\Filelist\FileList\formatFileList(), TYPO3\CMS\Backend\View\PageLayoutView\generateLanguageView(), TYPO3\CMS\Info\Controller\PageInformationController\getIcon(), TYPO3\CMS\Backend\View\PageLayoutView\getIcon(), TYPO3\CMS\Backend\View\BackendLayout\Grid\GridColumnItem\getIcons(), TYPO3\CMS\Backend\View\BackendLayout\Grid\LanguageColumn\getPageIcon(), TYPO3\CMS\Backend\Template\DocumentTemplate\getPageInfo(), TYPO3\CMS\Backend\Template\Components\MetaInformation\getRecordInformations(), TYPO3\CMS\Info\Controller\InfoPageTyposcriptConfigController\main(), TYPO3\CMS\Backend\Form\FieldWizard\RecordsOverview\render(), TYPO3\CMS\Backend\Form\Container\OuterWrapContainer\render(), TYPO3\CMS\Backend\View\PageLayoutView\renderContentElementPreview(), TYPO3\CMS\Info\Controller\TranslationStatusController\renderL10nTable(), TYPO3\CMS\Recordlist\RecordList\DatabaseRecordList\renderListRow(), TYPO3\CMS\Backend\Preview\StandardContentPreviewRenderer\renderPageModulePreviewContent(), TYPO3\CMS\Fluid\ViewHelpers\Be\PageInfoViewHelper\renderStatic(), TYPO3\CMS\Backend\View\PageTreeView\wrapIcon(), TYPO3\CMS\Backend\Tree\View\BrowseTreeView\wrapIcon(), TYPO3\CMS\Backend\Tree\View\FolderTreeView\wrapIcon(), TYPO3\CMS\Backend\View\PageTreeView\wrapTitle(), and TYPO3\CMS\Backend\Tree\View\FolderTreeView\wrapTitle().

◆ wrapInHelp()

static string TYPO3\CMS\Backend\Utility\BackendUtility::wrapInHelp (   $table,
  $field,
  $text = '',
array  $overloadHelpText = [] 
)
static

API function that wraps the text / html in help text, so if a user hovers over it the help text will show up

Parameters
string$table‪The table name for which the help should be shown
string$field‪The field name for which the help should be shown
string$text‪The text which should be wrapped with the help text
array$overloadHelpText‪Array with text to overload help text
Returns
‪string the HTML code ready to render

should only be used from within TYPO3 Core

Definition at line 2260 of file BackendUtility.php.

References TYPO3\CMS\Backend\Utility\BackendUtility\helpText(), and TYPO3\CMS\Core\Imaging\Icon\SIZE_SMALL.

Referenced by TYPO3\CMS\Backend\Utility\BackendUtility\cshItem(), TYPO3\CMS\Linkvalidator\Report\LinkValidatorReport\getCheckOptions(), TYPO3\CMS\Setup\Controller\SetupModuleController\getCSH(), TYPO3\CMS\Recordlist\RecordList\DatabaseRecordList\getTable(), TYPO3\CMS\Linkvalidator\Report\LinkValidatorReport\getVariablesForTableHeader(), TYPO3\CMS\Recordlist\Controller\RecordListController\main(), TYPO3\CMS\Backend\Clipboard\Clipboard\printClipboard(), TYPO3\CMS\Backend\Form\Container\FlexFormElementContainer\render(), TYPO3\CMS\Backend\Form\Element\SelectCheckBoxElement\render(), TYPO3\CMS\Backend\Controller\NewRecordController\renderNewRecordControls(), TYPO3\CMS\Fluid\ViewHelpers\Be\Buttons\CshViewHelper\renderStatic(), TYPO3\CMS\Fluid\ViewHelpers\Be\Labels\CshViewHelper\renderStatic(), and TYPO3\CMS\Backend\Form\Container\PaletteAndSingleContainer\wrapSingleFieldContentWithLabelAndOuterDiv().

◆ wsMapId()

static int TYPO3\CMS\Backend\Utility\BackendUtility::wsMapId (   $table,
  $uid 
)
static

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

Parameters
string$table‪Table name
int$uid‪Record uid (of live record placeholder)
Returns
‪int Uid of offline version if any, otherwise live uid.

should only be used from within TYPO3 Core

Definition at line 3827 of file BackendUtility.php.

References TYPO3\CMS\Backend\Utility\BackendUtility\getWorkspaceVersionOfRecord().

Referenced by TYPO3\CMS\Core\DataHandling\DataHandler\dbAnalysisStoreExec(), TYPO3\CMS\Impexp\Import\processSoftReferences(), TYPO3\CMS\Impexp\Import\processSoftReferences_substTokens(), TYPO3\CMS\Core\DataHandling\DataHandler\remapListedDBRecords(), TYPO3\CMS\Impexp\Import\setFlexFormRelations(), TYPO3\CMS\Impexp\Import\setRelations(), and TYPO3\CMS\Backend\Tests\Unit\Utility\BackendUtilityTest\wsMapIdReturnsLiveIdIfNoBeUserIsAvailable().