TYPO3
7.6
|
Static Public Member Functions | |
static | deleteClause ($table, $tableAlias= '') |
static | getRecord ($table, $uid, $fields= '*', $where= '', $useDeleteClause=true) |
static | getRecordWSOL ($table, $uid, $fields= '*', $where= '', $useDeleteClause=true, $unsetMovePointers=false) |
static | getRecordRaw ($table, $where= '', $fields= '*') |
static | getRecordsByField ($theTable, $theField, $theValue, $whereClause= '', $groupBy= '', $orderBy= '', $limit= '', $useDeleteClause=true) |
static | splitTable_Uid ($str) |
static | getSQLselectableList ($in_list, $tablename, $default_tablename) |
static | BEenableFields ($table, $inv=false) |
static | getRecordLocalization ($table, $uid, $language, $andWhereClause= '') |
static | BEgetRootLine ($uid, $clause= '', $workspaceOL=false) |
static | openPageTree ($pid, $clearExpansion) |
static | getRecordPath ($uid, $clause, $titleLimit, $fullTitleLimit=0) |
static | getExcludeFields () |
static | getExplicitAuthFieldValues () |
static | getOriginalTranslationTable ($table) |
static | isTableLocalizable ($table) |
static | getInlineLocalizationMode ($table, $fieldOrConfig) |
static | readPageAccess ($id, $perms_clause) |
static | getTCAtypes ($table, $rec, $useFieldNameAsKey=false) |
static | getTCAtypeValue ($table, $row) |
static | getSpecConfParts ($defaultExtrasString, $_= '') |
static | getSpecConfParametersFromArray ($pArr) |
static | getFlexFormDS ($conf, $row, $table, $fieldName= '', $WSOL=true, $newRecordPidValue=0) |
static | getRegisteredFlexForms ($table= 'tt_content') |
static | getPagesTSconfig ($id, $rootLine=null, $returnPartArray=false) |
static | implodeTSParams ($p, $k= '') |
static | getUserNames ($fields= 'username, usergroup, usergroup_cached_list, uid', $where= '') |
static | getGroupNames ($fields= 'title, uid', $where= '') |
static | getListGroupNames ($fields= 'title, uid') |
static | blindUserNames ($usernames, $groupArray, $excludeBlindedFlag=false) |
static | blindGroupNames ($groups, $groupArray, $excludeBlindedFlag=false) |
static | daysUntil ($tstamp) |
static | date ($tstamp) |
static | datetime ($value) |
static | time ($value, $withSeconds=true) |
static | calcAge ($seconds, $labels= 'min|hrs|days|yrs|min|hour|day|year') |
static | dateTimeAge ($tstamp, $prefix=1, $date= '') |
static | titleAltAttrib ($content) |
static | getThumbNail ($thumbScript, $theFile, $tparams= '', $size= '') |
static | titleAttribForPages ($row, $perms_clause= '', $includeAttrib=true) |
static | getRecordToolTip (array $row, $table= 'pages') |
static | getRecordIconAltText ($row, $table= 'pages') |
static | getLabelFromItemlist ($table, $col, $key) |
static | getLabelFromItemListMerged ($pageId, $table, $column, $key) |
static | getLabelsFromItemsList ($table, $column, $keyList, array $columnTsConfig=array()) |
static | getItemLabel ($table, $col, $printAllWrap= '') |
static | getRecordTitle ($table, $row, $prep=false, $forceResult=true) |
static | getRecordTitlePrep ($title, $titleLength=0) |
static | getNoRecordTitle ($prep=false) |
static | getProcessedValueExtra ($table, $fN, $fV, $fixed_lgd_chars=0, $uid=0, $forceResult=true, $pid=0) |
static | getCommonSelectFields ($table, $prefix= '', $fields=array()) |
static | makeConfigForm ($configArray, $defaults, $dataPrefix) |
static | helpTextIcon ($table, $field, $_= '', $force=false) |
static | helpTextArray ($table, $field) |
static | cshItem ($table, $field, $_= '', $wrap= '') |
static | editOnClick ($params, $_= '', $requestUri= '') |
static | viewOnClick ($pageUid, $backPath= '', $rootLine=null, $anchorSection= '', $alternativeUrl= '', $additionalGetVars= '', $switchFocus=true) |
static | wrapClickMenuOnIcon ($content, $table, $uid=0, $listFrame=true, $addParams= '', $enDisItems= '', $returnTagParameters=false) |
static | getLinkToDataHandlerAction ($parameters, $redirectUrl= '') |
static | getModTSconfig ($id, $TSref) |
static | getFuncMenu ($mainParams, $elementName, $currentValue, $menuItems, $script= '', $addParams= '') |
static | getDropdownMenu ($mainParams, $elementName, $currentValue, $menuItems, $script= '', $addParams= '') |
static | getFuncCheck ($mainParams, $elementName, $currentValue, $script= '', $addParams= '', $tagParams= '') |
static | getFuncInput ($mainParams, $elementName, $currentValue, $size=10, $script= '', $addParams= '') |
static | unsetMenuItems ($modTSconfig, $itemArray, $TSref) |
static | setUpdateSignal ($set= '', $params= '') |
static | getUpdateSignalCode () |
static | getModuleData ($MOD_MENU, $CHANGED_SETTINGS, $modName, $type= '', $dontValidateList= '', $setDefaultList= '') |
static | getUrlToken ($formName= 'securityToken', $tokenName= 'formToken') |
static | lockRecords ($table= '', $uid=0, $pid=0) |
static | isRecordLocked ($table, $uid) |
static | exec_foreign_table_where_query ($fieldConfig, $field= '', $TSconfig=array()) |
static | replaceMarkersInWhereClause ($whereClause, $table, $field= '', $tsConfig=array()) |
static | getTCEFORM_TSconfig ($table, $row) |
static | getTSconfig_pidValue ($table, $uid, $pid) |
static | getPidForModTSconfig ($table, $uid, $pid) |
static | getTSCpidCached ($table, $uid, $pid) |
static | getTSCpid ($table, $uid, $pid) |
static | firstDomainRecord ($rootLine) |
static | getDomainStartPage ($domain, $path= '') |
static | RTEsetup ($RTEprop, $table, $field, $type= '') |
static | RTEgetObj () |
static & | softRefParserObj ($spKey) |
static | explodeSoftRefParserList ($parserList) |
static | isModuleSetInTBE_MODULES ($modName) |
static | referenceCount ($table, $ref, $msg= '', $count=null) |
static | translationCount ($table, $ref, $msg= '') |
static | selectVersionsOfRecord ($table, $uid, $fields= '*', $workspace=0, $includeDeletedRecords=false, $row=null) |
static | fixVersioningPid ($table, &$rr, $ignoreWorkspaceMatch=false) |
static | workspaceOL ($table, &$row, $wsid=-99, $unsetMovePointers=false) |
static | movePlhOL ($table, &$row) |
static | getWorkspaceVersionOfRecord ($workspace, $table, $uid, $fields= '*') |
static | getLiveVersionOfRecord ($table, $uid, $fields= '*') |
static | getLiveVersionIdOfRecord ($table, $uid) |
static | versioningPlaceholderClause ($table) |
static | getWorkspaceWhereClause ($table, $workspaceId=null) |
static | countVersionsOfRecordsOnPage ($workspace, $pageId) |
static | wsMapId ($table, $uid) |
static | getMovePlaceholder ($table, $uid, $fields= '*', $workspace=null) |
static | TYPO3_copyRightNotice () |
static | getPathType_web_nonweb ($path) |
static | processParams ($params) |
static | getBackendScript ($interface= '') |
static | isTableWorkspaceEnabled ($table) |
static | isTableMovePlaceholderAware ($table) |
static | getTcaFieldConfiguration ($table, $field) |
static | isWebMountRestrictionIgnored ($table) |
static | isRootLevelRestrictionIgnored ($table) |
static | shortcutExists ($url) |
Static Protected Member Functions | |
static | getPageForRootline ($uid, $clause, $workspaceOL) |
static | getRecordsSortedByTitle (array $fields, $table, $titleField, $where= '') |
static | replaceL10nModeFields ($table, array $row) |
static | createPreviewUrl ($pageUid, $rootLine, $anchorSection, $additionalGetVars, $viewScript) |
static | buildScriptUrl ($mainParams, $addParams, $script= '') |
static | getRuntimeCache () |
static | getSignalSlotDispatcher () |
static | emitGetPagesTSconfigPreIncludeSignal (array $TSdataArray, $id, array $rootLine, $returnPartArray) |
static | getDatabaseConnection () |
static | getLanguageService () |
static | getBackendUserAuthentication () |
static | getDocumentTemplate () |
Static Protected Attributes | |
static | $tcaTableTypeConfigurationCache = array() |
Standard functions available for the TYPO3 backend. You are encouraged to use this class in your own applications (Backend Modules) Don't instantiate - call functions with "\TYPO3\CMS\Backend\Utility\BackendUtility::" prefixed the function name.
Call ALL methods without making an object! Eg. to get a page-record 51 do this: '::getRecord('pages',51)'
Definition at line 53 of file backend/Classes/Utility/BackendUtility.php.
|
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.
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) |
Definition at line 266 of file backend/Classes/Utility/BackendUtility.php.
References $GLOBALS.
Referenced by Abbreviation\buildJSAbbreviationArray(), SchedulerModuleController\checkSchedulerUser(), CrawlerHook\crawler_execute_type1(), ImportExport\fetchStorageRecords(), DefaultAvatarProvider\getAvatarFileUid(), SetupModuleController\getAvatarFileUid(), Typo3DbQueryParser\getBackendConstraintStatement(), Typo3DbBackend\getBackendConstraintStatement(), DefaultDataProvider\getBackendLayout(), StagesService\getBackendUsers(), DataHandlerHook\getEmailsForStageChangeNotification(), BackendUserAuthentication\getFileMountRecords(), Language\getLanguages(), DefaultDataProvider\getLayoutData(), LinkAnalyzer\getLinkStatistics(), PageLayoutController\getNumberOfHiddenElements(), LinkHandler\getRecordRow(), SchedulerModuleController\getRegisteredTaskGroups(), LoginController\getSystemNews(), BrowseTreeView\getTitleStr(), BackendUserAuthentication\isUserAllowedToLogin(), PageLayoutController\makeQuickEditMenu(), PagePositionMap\printContentElementColumns(), and SetupModuleController\simulateUser().
|
static |
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.
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! |
Definition at line 334 of file backend/Classes/Utility/BackendUtility.php.
Referenced by DatabasePageRootline\addData(), VersionModuleController\adminLinks(), ActionTask\checkRootline(), TreelistCacheUpdateHooks\clearCacheForAllParents(), ConditionMatcher\determineRootline(), ExtendedTemplateService\ext_prevPageWithTemplate(), EditDocumentController\generatePreviewCode(), InternalLinktype\getBrokenUrl(), InfoModuleController\getButtons(), PageFunctionsController\getButtons(), DatabaseRecordList\getButtons(), VersionModuleController\getButtons(), ImportExportController\getButtons(), NewRecordController\getButtons(), TypoScriptTemplateModuleController\getButtons(), DatabaseRecordList\getDocHeaderButtons(), ViewModuleController\getDomainName(), InfoPageTyposcriptConfigController\getOverviewOfPagesUsingTSConfig(), ElementInformationController\getRecordActions(), BackendLayoutView\getRootLine(), PermissionController\initializeView(), BackendUserAuthentication\isInWebMount(), PageLayoutController\main(), PageLayoutController\makeButtons(), and DocumentTemplate\viewPageIcon().
|
static |
Corresponds to blindUserNames but works for groups instead
array | $groups | Group names |
array | $groupArray | Group names (reference) |
bool | $excludeBlindedFlag | If $excludeBlindedFlag is set, then these records are unset from the array $usernames |
Definition at line 1504 of file backend/Classes/Utility/BackendUtility.php.
References ArrayUtility\inArray().
|
static |
Returns the array $usernames with the names of all users NOT IN $groupArray changed to the uid (hides the usernames!). If $excludeBlindedFlag is set, then these records are unset from the array $usernames Takes $usernames (array made by ::getUserNames()) and a $groupArray (array with the groups a certain user is member of) as input
array | $usernames | User names |
array | $groupArray | Group names |
bool | $excludeBlindedFlag | If $excludeBlindedFlag is set, then these records are unset from the array $usernames |
Definition at line 1470 of file backend/Classes/Utility/BackendUtility.php.
References GeneralUtility\inList().
|
staticprotected |
Builds the URL to the current script with given arguments
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 |
Definition at line 3297 of file backend/Classes/Utility/BackendUtility.php.
References elseif.
|
static |
Returns the "age" in minutes / hours / days / years of the number of $seconds inputted.
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:lang/locallang_core.xlf:labels.minutesHoursDaysYears") |
Definition at line 1589 of file backend/Classes/Utility/BackendUtility.php.
References elseif.
Referenced by BackendUtilityTest\calcAgeReturnsExpectedValues(), NoneElement\formatValue(), RteController\getButtons(), EditDocumentController\getButtons(), TcaRecordTitle\getRecordTitleForInputType(), and PageLayoutController\makeButtons().
|
static |
Count number of versions on a page
int | $workspace | Workspace ID |
int | $pageId | Page ID |
Definition at line 4556 of file backend/Classes/Utility/BackendUtility.php.
|
staticprotected |
Creates the view-on-click preview URL without any alternative URL.
int | $pageUid | Page UID |
array | $rootLine | If rootline is supplied, the function will look for the first found domain record and use that URL instead |
string | $anchorSection | Optional anchor to the URL |
string | $additionalGetVars | Additional GET variables. |
string | $viewScript | The path to the script used to view the page |
Definition at line 3044 of file backend/Classes/Utility/BackendUtility.php.
|
static |
API for getting CSH icons/text for use in backend modules. TCA_DESCR will be loaded if it isn't already
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. |
Definition at line 2881 of file backend/Classes/Utility/BackendUtility.php.
Referenced by DatabaseRecordList\getButtons(), PageTreeNavigationController\getButtons(), NewRecordController\getButtons(), PageLayoutView\getTable_pages(), SortPagesWizardModuleFunction\main(), PageInformationController\main(), CreatePagesWizardModuleFunctionController\main(), TranslationStatusController\main(), InfoPageTyposcriptConfigController\main(), CreateFolderController\main(), ImportExportController\makeAdvancedOptionsForm(), ImportExportController\makeConfigurationForm(), ImportExportController\makeSaveForm(), HelpButton\render(), and CshViewHelper\renderStatic().
|
static |
Returns $tstamp formatted as "ddmmyy" (According to $GLOBALS['TYPO3_CONF_VARS']['SYS']['ddmmyy'])
int | $tstamp | Time stamp, seconds |
Definition at line 1546 of file backend/Classes/Utility/BackendUtility.php.
References $GLOBALS.
Referenced by BackendUtility\datetime(), FileController\flattenResultDataValue(), FileFacade\getLastModified(), and TcaRecordTitle\getRecordTitleForInputType().
|
static |
Returns $tstamp formatted as "ddmmyy hhmm" (According to $GLOBALS['TYPO3_CONF_VARS']['SYS']['ddmmyy'] AND $GLOBALS['TYPO3_CONF_VARS']['SYS']['hhmm'])
int | $value | Time stamp, seconds |
Definition at line 1557 of file backend/Classes/Utility/BackendUtility.php.
References $GLOBALS, and BackendUtility\date().
Referenced by ExtDirectServer\getCommentsForRecord(), HistoryService\getHistoryEntry(), TcaRecordTitle\getRecordTitleForInputType(), SortPagesWizardModuleFunction\main(), ModuleController\printLogMgm(), DateTimeViewHelper\renderStatic(), and DeletedRecordsController\transform().
|
static |
Returns a formatted timestamp if $tstamp is set. The date/datetime will be followed by the age in parenthesis.
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 |
Definition at line 1619 of file backend/Classes/Utility/BackendUtility.php.
References $GLOBALS.
Referenced by ActionTask\viewEditRecord().
|
static |
Returns the difference in days between input $tstamp and $EXEC_TIME
int | $tstamp | Time stamp, seconds |
Definition at line 1534 of file backend/Classes/Utility/BackendUtility.php.
References $GLOBALS.
|
static |
Returns the WHERE clause " AND NOT [tablename].[deleted-field]" if a deleted-field is configured in $GLOBALS['TCA'] for the tablename, $table This function should ALWAYS be called in the backend for selection on tables which are configured in $GLOBALS['TCA'] since it will ensure consistent selection of records, even if they are marked deleted (in which case the system must always treat them as non-existent!) In the frontend a function, ->enableFields(), is known to filter hidden-field, start- and endtime and fe_groups as well. But that is a job of the frontend, not the backend. If you need filtering on those fields as well in the backend you can use ->BEenableFields() though.
string | $table | Table name present in $GLOBALS['TCA'] |
string | $tableAlias | Table alias if any |
Definition at line 82 of file backend/Classes/Utility/BackendUtility.php.
References $GLOBALS.
Referenced by DatabasePageLanguageOverlayRows\addData(), DataHandler\addDefaultPermittedLanguageIfNotSet(), AbstractExportTestCase\addRecordsForPid(), AutoPublishService\autoPublishWorkspaces(), WorkspacesUtility\autoPublishWorkspaces(), AbstractItemProvider\buildForeignTableQuery(), Abbreviation\buildJSAbbreviationArray(), SchedulerModuleController\checkSchedulerUser(), BackendUserAuthentication\checkWorkspace(), CrawlerHook\cleanUpOldRunningConfigurations(), DatabaseIntegrityCheck\countRecords(), CrawlerHook\crawler_execute_type1(), CrawlerHook\crawler_execute_type4(), CrawlerHook\crawler_init(), EditDocumentController\editRegularContentFromId(), PageLayoutController\exec_languageQuery(), PageLinkHandler\expandPage(), Bootstrap\expectOutput(), ImportExport\fetchStorageRecords(), RecordCollectionRepository\findByUid(), DataHandlerHook\findPageElementsForVersionStageChange(), DataHandlerHook\findPageElementsForVersionSwap(), DataHandlerHook\findPageIdsForVersionStateChange(), DataHandlerHook\flushWorkspaceElements(), AbstractDatabaseRecordList\generateList(), CleanerCommand\genTree(), DatabaseIntegrityCheck\genTree_records(), CleanerCommand\genTree_traverse(), FlexFormTools\getAvailableLanguages(), WorkspaceService\getAvailableWorkspaces(), DefaultAvatarProvider\getAvatarFileUid(), SetupModuleController\getAvatarFileUid(), Typo3DbQueryParser\getBackendConstraintStatement(), Typo3DbBackend\getBackendConstraintStatement(), DefaultDataProvider\getBackendLayout(), TranslationStatusController\getContentElementCount(), AbstractTreeView\getCount(), ActionTask\getCreatedUsers(), AbstractTreeView\getDataInit(), BackendUserAuthentication\getDefaultWorkspace(), PageLayoutController\getElementsFromColumnAndLanguage(), BackendUserAuthentication\getFileMountRecords(), TranslationStatusController\getLangStatus(), Language\getLanguages(), EditDocumentController\getLanguages(), DefaultDataProvider\getLayoutData(), PageLayoutController\getLocalizedPageTitle(), WorkspaceService\getMoveToPlaceHolderFromPages(), PageLayoutView\getNonTranslatedTTcontentUids(), PageLayoutController\getNumberOfHiddenElements(), InfoPageTyposcriptConfigController\getOverviewOfPagesUsingTSConfig(), ViewModuleController\getPreviewLanguages(), AdminPanelView\getPreviewModule(), AbstractDatabaseRecordProvider\getRecordFromDatabase(), LinkHandler\getRecordRow(), LocalizationController\getRecordsToCopyDatabaseResult(), SchedulerModuleController\getRegisteredTaskGroups(), QueryGenerator\getSelectQuery(), ShortcutToolbarItem\getShortcutIcon(), TranslationStatusController\getSystemLanguages(), LoginController\getSystemNews(), PageLayoutView\getTable_pages(), PageLayoutView\getTableMenu(), BrowseTreeView\getTitleStr(), QueryGenerator\getTreeList(), DataProvider\getWhereClause(), WorkspaceService\hasPageRecordVersions(), AbstractRecordList\initializeLanguages(), WorkspaceService\isNewPage(), EditDocumentController\languageSwitch(), CategoryCollection\load(), AbstractRecordCollection\load(), EditDocumentController\localizationRedirect(), VersionsCommand\main(), PageLayoutController\makeButtons(), QueryGenerator\makeOptionList(), AbstractDatabaseRecordList\makeQueryArray(), LiveSearch\makeQuerySearchByTable(), PageLayoutController\makeQuickEditMenu(), DataHandler\noRecordsFromUnallowedTables(), PageLayoutView\numberOfRecords(), VersionModuleController\pageSubContent(), PagePositionMap\printContentElementColumns(), CrawlerHook\processDatamap_afterDatabaseOperations(), QueryView\queryMaker(), RecordCollectionRepository\queryMultipleRecords(), RelationHandler\readForeignField(), DataHandlerHook\resetStageOfElements(), WorkspaceService\selectAllVersionsFromPages(), WorkspacesUtility\selectVersionsInWorkspace(), DatabaseIntegrityCheck\testDBRefs(), and TranslationConfigurationProvider\translationInfo().
|
static |
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)
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. |
Definition at line 2907 of file backend/Classes/Utility/BackendUtility.php.
Referenced by DatabaseRecordList\getButtons(), DatabaseRecordList\getDocHeaderButtons(), PageLayoutView\getTable_pages(), PageLayoutView\linkEditContent(), AbstractDatabaseRecordList\linkWrapItems(), PageLayoutController\makeButtons(), PageLayoutView\makeOrdinaryList(), PageLayoutView\newContentElementOnClick(), PagePositionMap\onClickEvent(), PageLayoutView\pages_drawItem(), TranslationStatusController\renderL10nTable(), DatabaseRecordList\renderListHeader(), PageLayoutView\tt_content_drawColHeader(), and PageLayoutView\tt_content_drawHeader().
|
staticprotected |
Emits signal to modify the page TSconfig before include
array | $TSdataArray | Current TSconfig data array - Can be modified by slots! |
int | $id | Page ID we are handling |
array | $rootLine | Rootline array of page |
bool | $returnPartArray | Whether TSdata should be parsed by TS parser or returned as plain text |
Definition at line 4880 of file backend/Classes/Utility/BackendUtility.php.
|
static |
Returns select statement for MM relations (as used by TCEFORMs etc)
array | $fieldConfig | Configuration array for the field, taken from $GLOBALS['TCA'] |
string | $field | Field name |
array | $TSconfig | TSconfig array from which to get further configuration settings for the field name |
Definition at line 3683 of file backend/Classes/Utility/BackendUtility.php.
|
static |
Returns array of soft parser references
string | $parserList | softRef parser list |
Definition at line 4101 of file backend/Classes/Utility/BackendUtility.php.
Referenced by ReferenceIndex\getRelations(), and ReferenceIndex\getRelations_flexFormCallBack().
|
static |
Returns first found domain record "domainName" (without trailing slash) if found in the input $rootLine
array | $rootLine | Root line array |
Definition at line 3953 of file backend/Classes/Utility/BackendUtility.php.
Referenced by InternalLinktype\getBrokenUrl(), and ViewModuleController\getDomainName().
|
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.
string | $table | Table name |
array | $rr | Record array passed by reference. As minimum, "pid" and "uid" fields must exist! "t3ver_oid" and "t3ver_wsid" is nice and will save you a DB query. |
bool | $ignoreWorkspaceMatch | Ignore workspace match |
Definition at line 4291 of file backend/Classes/Utility/BackendUtility.php.
Referenced by DatabaseEditRow\addData(), RecyclerUtility\checkAccess(), AbstractWizardController\checkEditAccess(), DataHandler\destNotInsideSelf(), DataHandler\doesRecordExist(), DataHandler\fillInFieldArray(), RecyclerUtility\getRecordPath(), DataHandler\getRecordPropertiesFromRow(), RichTextElement\render(), and RichTextNodeResolver\resolve().
|
static |
Returns the name of the backend script relative to the TYPO3 main directory.
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. |
Definition at line 4750 of file backend/Classes/Utility/BackendUtility.php.
Referenced by AdminPanelView\getEditModule().
|
staticprotected |
Definition at line 4905 of file backend/Classes/Utility/BackendUtility.php.
|
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)
string | $table | Table name, present in $GLOBALS['TCA'] |
string | $prefix | Table prefix |
array | $fields | Preset fields (must include prefix if that is used) |
Definition at line 2620 of file backend/Classes/Utility/BackendUtility.php.
Referenced by AbstractItemProvider\buildForeignTableQuery(), DatabaseIntegrityCheck\genTree_records(), and BackendUtilityTest\getCommonSelectFieldsReturnsCorrectFields().
|
staticprotected |
Definition at line 4889 of file backend/Classes/Utility/BackendUtility.php.
|
staticprotected |
Definition at line 4913 of file backend/Classes/Utility/BackendUtility.php.
|
static |
Returns the sys_domain record for $domain, optionally with $path appended.
string | $domain | Domain name |
string | $path | Appended path |
Definition at line 3972 of file backend/Classes/Utility/BackendUtility.php.
|
static |
Returns a selector box to switch the view Requires the JS function jumpToUrl() to be available Based on BackendUtility::getFuncMenu() but done as new function because it has another purpose. Mingling with getFuncMenu would harm the docHeader Menu.
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. |
Definition at line 3215 of file backend/Classes/Utility/BackendUtility.php.
Referenced by DatabaseIntegrityView\func_search(), PageInformationController\main(), TranslationStatusController\main(), InfoPageTyposcriptConfigController\main(), TypoScriptTemplateConstantEditorModuleFunctionController\main(), and TypoScriptTemplateObjectBrowserModuleFunctionController\main().
|
static |
Returns an array with the exclude-fields as defined in TCA and FlexForms Used for listing the exclude-fields in be_groups forms
Definition at line 504 of file backend/Classes/Utility/BackendUtility.php.
References $extConf, $GLOBALS, $lang, and GeneralUtility\logDeprecatedFunction().
|
static |
Returns an array with explicit Allow/Deny fields. Used for listing these field/value pairs in be_groups forms
Definition at line 587 of file backend/Classes/Utility/BackendUtility.php.
References $GLOBALS, $lang, elseif, and GeneralUtility\logDeprecatedFunction().
|
static |
Finds the Data Structure for a FlexForm field
NOTE ON data structures for deleted records: This function may fail to deliver the data structure for a record for a few reasons: a) The data structure could be deleted (either with deleted-flagged or hard-deleted), b) the data structure is fetched using the ds_pointerField_searchParent in which case any deleted record on the route to the final location of the DS will make it fail. In theory, we can solve the problem in the case where records that are deleted-flagged keeps us from finding the DS - this is done at the markers ###NOTE_A### where we make sure to also select deleted records. However, we generally want the DS lookup to fail for deleted records since for the working website we expect a deleted-flagged record to be as inaccessible as one that is completely deleted from the DB. Any way we look at it, this may lead to integrity problems of the reference index and even lost files if attached. However, that is not really important considering that a single change to a data structure can instantly invalidate large amounts of the reference index which we do accept as a cost for the flexform features. Other than requiring a reference index update, deletion of/changes in data structure or the failure to look them up when completely deleting records may lead to lost files in the uploads/ folders since those are now without a proper reference.
array | $conf | Field config array |
array | $row | Record data |
string | $table | The table name |
string | $fieldName | Optional fieldname passed to hook object |
bool | $WSOL | If set, workspace overlay is applied to records. This is correct behaviour for all presentation and export, but NOT if you want a TRUE reflection of how things are in the live workspace. |
int | $newRecordPidValue | SPECIAL CASES: Use this, if the DataStructure may come from a parent record and the INPUT row doesn't have a uid yet (hence, the pid cannot be looked up). Then it is necessary to supply a PID value to search recursively in for the DS (used from TCEmain) |
Definition at line 993 of file backend/Classes/Utility/BackendUtility.php.
References $GLOBALS, MathUtility\canBeInterpretedAsInteger(), elseif, GeneralUtility\getFileAbsFileName(), GeneralUtility\getUrl(), GeneralUtility\getUserObj(), GeneralUtility\trimExplode(), and GeneralUtility\xml2array().
Referenced by DataHandler\checkValueForFlex(), DataHandler\copyRecord_procBasedOnFieldType(), TcaFlexFetch\initializeDataStructure(), SuggestWizard\overrideFieldNameAndConfigurationForFlexform(), DataHandler\remapListedDBRecords(), ImportExport\setFlexFormRelations(), and FlexFormTools\traverseFlexFormXMLData().
|
static |
Checkbox function menu. Works like ->getFuncMenu() but takes no $menuItem array since this is a simple checkbox.
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 |
Definition at line 3252 of file backend/Classes/Utility/BackendUtility.php.
Referenced by DatabaseIntegrityView\func_search(), FileBrowser\getBulkSelector(), BackendUtilityTest\getFuncCheckReturnsInputTagWithValueAttribute(), InfoPageTyposcriptConfigController\main(), TemplateAnalyzerModuleFunctionController\main(), TypoScriptTemplateInformationModuleFunctionController\main(), TypoScriptTemplateObjectBrowserModuleFunctionController\main(), and QueryGenerator\makeSelectorTable().
|
static |
Input field function menu Works like ->getFuncMenu() / ->getFuncCheck() but displays an input field instead which updates the script "onchange"
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. |
Definition at line 3282 of file backend/Classes/Utility/BackendUtility.php.
|
static |
Returns a selector box "function menu" for a module Requires the JS function jumpToUrl() to be available See Inside TYPO3 for details about how to use / make Function menus
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. |
Definition at line 3177 of file backend/Classes/Utility/BackendUtility.php.
Referenced by VersionModuleController\main().
|
static |
Returns an array with be_groups records (title, uid) of all groups NOT DELETED sorted by their title
string | $fields | Field list |
string | $where | WHERE clause |
Definition at line 1398 of file backend/Classes/Utility/BackendUtility.php.
References GeneralUtility\trimExplode().
Referenced by PermissionAjaxController\renderGroupSelector().
|
static |
Returns the value of the property localizationMode in the given $config array ($GLOBALS['TCA'][
['columns'][<field>]['config']). If the table is prepared for localization and no localizationMode is set, 'select' is returned by default. If the table is not prepared for localization or not defined at all in $GLOBALS['TCA'], FALSE is returned.
string | $table | The name of the table to lookup in TCA |
mixed | $fieldOrConfig | The fieldname (string) or the configuration of the field to check (array) |
Definition at line 715 of file backend/Classes/Utility/BackendUtility.php.
References $GLOBALS, and elseif.
Referenced by DataHandler\copyRecord_procBasedOnFieldType(), InlineStackProcessor\initializeByParsingDomObjectIdString(), and InlineStackProcessor\injectAjaxConfiguration().
|
static |
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'
string | $table | Table name, present in $GLOBALS['TCA'] |
string | $col | Field name |
string | $printAllWrap | Wrap value - set function description - this parameter is deprecated since TYPO3 6.2 and is removed two versions later. This parameter is a conceptual failure, as the content can then never be HSCed afterwards (which is how the method is used all the time), and then the code would be HSCed twice. |
Definition at line 2117 of file backend/Classes/Utility/BackendUtility.php.
Referenced by DataHandler\checkValueForCheck(), HistoryService\getDifferences(), PageLayoutView\getTable_pages(), RecordHistory\renderDiff(), ElementInformationController\renderFileInformationAsTable(), and DatabaseRecordList\renderListHeader().
|
static |
Returns the label of the first found entry in an "items" array from $GLOBALS'TCA' where the value is $key
string | $table | Table name, present in $GLOBALS['TCA'] |
string | $col | Field name, present in $GLOBALS['TCA'] |
string | $key | items-array value to match |
Definition at line 2013 of file backend/Classes/Utility/BackendUtility.php.
Referenced by BackendUtilityTest\getLabelFromItemlistReturnsCorrectFields(), PageLayoutController\makeQuickEditMenu(), and PagePositionMap\printRecordMap().
|
static |
Return the label of a field by additionally checking TsConfig values
int | $pageId | Page id |
string | $table | Table name |
string | $column | Field Name |
string | $key | item value |
Definition at line 2037 of file backend/Classes/Utility/BackendUtility.php.
References elseif.
Referenced by BackendUtilityTest\getLabelFromItemListMergedReturnsCorrectFields().
|
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
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. |
Definition at line 2067 of file backend/Classes/Utility/BackendUtility.php.
References elseif.
Referenced by BackendUtilityTest\getLabelsFromItemsListReturnsCorrectValue().
|
staticprotected |
Definition at line 4897 of file backend/Classes/Utility/BackendUtility.php.
|
static |
Returns a URL with a command to TYPO3 Datahandler
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 |
Definition at line 3017 of file backend/Classes/Utility/BackendUtility.php.
References $url.
Referenced by VersionModuleController\adminLinks(), DocumentTemplate\issueCommand(), EditDocumentController\languageSwitch(), PageLayoutView\tt_content_drawHeader(), and VersionModuleController\versioningMgm().
|
static |
Returns an array with be_groups records (like ->getGroupNames) but:
string | $fields | Field list; $fields specify the fields selected (default: title,uid) |
Definition at line 1450 of file backend/Classes/Utility/BackendUtility.php.
Referenced by PermissionController\editAction().
|
static |
Gets the id of the live version of a record.
string | $table | Name of the table |
int | $uid | Uid of the offline/draft record |
Definition at line 4499 of file backend/Classes/Utility/BackendUtility.php.
Referenced by TcaInline\addInlineFirstPid(), TcaInline\getLiveDefaultId(), RelationHandler\getLiveDefaultId(), DataHandler\remapListedDBRecords_procDBRefs(), and WorkspaceService\viewSingleRecord().
|
static |
Returns live version of record
string | $table | Table name |
int | $uid | Record UID of draft, offline version |
string | $fields | Field list, default is * |
Definition at line 4483 of file backend/Classes/Utility/BackendUtility.php.
Referenced by DataHandler\getSortNumber(), AddController\init(), EditDocumentController\languageSwitch(), DataHandler\moveRecord(), DataHandler\placeholderShadowing(), DataHandlerHook\processCmdmap_deleteAction(), DataHandler\resolvePid(), DataHandlerHook\version_clearWSID(), and WorkspaceService\viewSingleRecord().
|
static |
Returns the merged User/Page TSconfig for page id, $id. Please read details about module programming elsewhere!
int | $id | Page uid |
string | $TSref | An object string which determines the path of the TSconfig to return. |
Definition at line 3152 of file backend/Classes/Utility/BackendUtility.php.
Referenced by PageLayoutView\checkIfTranslationsExistInLanguage(), ClickMenu\DB_newWizard(), BackendLayoutView\getColPosListItemsParsed(), EditDocumentController\getLanguages(), PagePositionMap\getModConfig(), BackendUtilityTest\getModTSconfigIgnoresValuesFromUserTsConfigIfNoSet(), ViewModuleController\getPreviewFrameWidths(), ViewModuleController\getPreviewLanguages(), TranslationConfigurationProvider\getSystemLanguages(), ViewModuleController\getTypeParameterIfSet(), NewContentElementController\init(), PageLayoutView\languageSelector(), ValidatorTask\loadModTsConfig(), WizardView\loadSettings(), InfoPageTyposcriptConfigController\main(), TypoScriptTemplateConstantEditorModuleFunctionController\main(), LinkValidatorReport\main(), NewRecordController\main(), PageLayoutController\makeActionMenu(), TaskModuleController\menuConfig(), BaseScriptClass\menuConfig(), RecordList\menuConfig(), NewRecordController\regularNew(), TranslationStatusController\renderL10nTable(), and DatabaseRecordList\renderListHeader().
|
static |
Returns an array which is most backend modules becomes MOD_SETTINGS containing values from function menus etc. determining the function of the module. This is kind of session variable management framework for the backend users. If a key from MOD_MENU is set in the CHANGED_SETTINGS array (eg. a value is passed to the script from the outside), this value is put into the settings-array Ultimately, see Inside TYPO3 for how to use this function in relation to your modules.
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) |
Definition at line 3440 of file backend/Classes/Utility/BackendUtility.php.
Referenced by AbstractFunctionModule\checkExtObj(), BaseScriptClass\checkExtObj(), FileBrowser\getBulkSelector(), AbstractFunctionModule\handleExternalFunctionValue(), ModuleController\main(), TypoScriptTemplateConstantEditorModuleFunctionController\main(), ConfigurationView\menuConfig(), DatabaseIntegrityView\menuConfig(), VersionModuleController\menuConfig(), BaseScriptClass\menuConfig(), RecordList\menuConfig(), FileListController\menuConfig(), PageLayoutController\menuConfig(), and QueryView\procesStoreControl().
|
static |
Returns move placeholder of online (live) version
string | $table | Table name |
int | $uid | Record UID of online version |
string | $fields | Field list, default is * |
int | NULL | $workspace | The workspace to be used |
Definition at line 4619 of file backend/Classes/Utility/BackendUtility.php.
Referenced by DataHandler\deleteVersionsForRecord(), DataHandler\getSortNumber(), DataHandlerHook\moveRecord(), DataHandlerHook\moveRecord_wsPlaceholders(), DataHandlerHook\processCmdmap_deleteAction(), DataHandlerHook\version_clearWSID(), and WorkspaceService\viewSingleRecord().
|
static |
Get a localized [No title] string, wrapped in | if $prep is TRUE.
bool | $prep | Wrap result in | |
Definition at line 2258 of file backend/Classes/Utility/BackendUtility.php.
Referenced by FormResultCompiler\JSbottom().
|
static |
Gets the original translation pointer table. For e.g. pages_language_overlay this would be pages.
string | $table | Name of the table |
Definition at line 681 of file backend/Classes/Utility/BackendUtility.php.
References $GLOBALS.
|
staticprotected |
Gets the cached page record for the rootline
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! |
Definition at line 393 of file backend/Classes/Utility/BackendUtility.php.
|
static |
Returns the Page TSconfig for page with id, $id
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 |
bool | $returnPartArray | If $returnPartArray is set, then the array with accumulated Page TSconfig is returned non-parsed. Otherwise the output will be parsed by the TypoScript parser. |
Definition at line 1261 of file backend/Classes/Utility/BackendUtility.php.
References $GLOBALS, StringUtility\beginsWith(), TypoScriptParser\checkIncludeLines_array(), ExtensionManagementUtility\extPath(), GeneralUtility\getUrl(), ExtensionManagementUtility\isLoaded(), GeneralUtility\makeInstance(), ArrayUtility\mergeRecursiveWithOverrule(), and GeneralUtility\trimExplode().
Referenced by BackendLayoutView\addBackendLayoutItems(), PageTsConfig\addData(), DataHandler\checkValue_flex_procInData_travDS(), Typo3DbBackend\clearPageCache(), DataHandler\fillInFieldArray(), PageTsBackendLayoutDataProvider\generatePageTsConfig(), EditDocumentController\generatePreviewCode(), NewRecordController\getButtons(), EditDocumentController\getButtons(), ViewModuleController\getDomainName(), AbstractLinkBrowserController\getLinkHandlers(), DataHandler\getTCEMAIN_TSconfig(), NewContentElementController\init(), BrowseLinksController\initVariables(), CreatePagesWizardModuleFunctionController\main(), InfoPageTyposcriptConfigController\main(), ParseHtmlController\main_parse_html(), UserElementsController\main_user(), NewRecordController\regularNew(), RichTextElement\render(), RichTextNodeResolver\resolve(), SuggestWizard\searchAction(), and WorkspaceService\viewSingleRecord().
|
static |
Returns "web" if the $path (absolute) is within the DOCUMENT ROOT - and thereby qualifies as a "web" folder.
string | $path | Path to evaluate |
Definition at line 4685 of file backend/Classes/Utility/BackendUtility.php.
|
static |
Return $uid if $table is pages and $uid is int - otherwise the $pid
string | $table | Table name |
int | $uid | Record uid |
int | $pid | Record pid |
Definition at line 3894 of file backend/Classes/Utility/BackendUtility.php.
|
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.
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 |
Definition at line 2592 of file backend/Classes/Utility/BackendUtility.php.
References elseif.
Referenced by DatabaseRecordList\renderListRow().
|
static |
Gets record with uid = $uid from $table You can set $field to a list of fields (default is '*') Additional WHERE clauses can be added by $where (fx. ' AND blabla = 1') Will automatically check if records has been deleted and if so, not return anything. $table must be found in $GLOBALS['TCA']
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 blablabla = 0 |
bool | $useDeleteClause | Use the deleteClause to check if a record is deleted (default TRUE) |
Definition at line 105 of file backend/Classes/Utility/BackendUtility.php.
References $GLOBALS.
Referenced by DatabaseRecordTypeValue\addData(), TcaInline\addInlineFirstPid(), CommandMap\applyWorkspacesSetStageBehaviour(), ValidatorTask\buildMail(), WorkspaceService\canCreatePreviewLink(), RecyclerUtility\checkAccess(), AbstractWizardController\checkEditAccess(), IntegrityService\checkLocalization(), FileMetadataPermissionsAspect\checkModifyAccessList(), PagePositionMap\checkNewPageInPid(), FileMetadataPermissionsAspect\checkRecordUpdateAccess(), ExportTest\compileExportGroupFileAndFileReferenceItem(), ExportTest\compileExportPagesAndRelatedTtContentWithImages(), CrawlerHook\crawler_execute_type4(), ElementEntityProcessor\createClearDependentElementChildReferenceCallback(), ElementEntityProcessor\createClearDependentElementParentReferenceCallback(), ShortcutToolbarItem\createShortcutAction(), DataHandler\deleteAction(), DataHandler\deleteRecord_procFields(), ActionHandler\deleteSingleRecord(), ImportExport\export_addDBRelations(), ExportTest\exportGroupFileAndFileReferenceItem(), ExportTest\exportIrreRecords(), ExportTest\exportPagesAndRelatedTtContent(), ExportTest\exportPagesAndRelatedTtContentWithRteImagesAndFileLink(), LiveSearch\findPageById(), DataHandlerHook\findPageElementsForVersionSwap(), DataHandlerHook\findPageIdsForVersionStateChange(), DataHandlerHook\findRealPageIds(), ActionTask\fixDbMount(), PageLayoutView\generateListForCTypeMenu(), EditDocumentController\generatePreviewCode(), ValidatorTask\getAdditionalInformation(), FlexFormTools\getAvailableLanguages(), WorkspacesUtility\getCmdArrayForPublishWS(), WorkspaceService\getCmdArrayForPublishWS(), ExtDirectServer\getCommentsForRecord(), LinkBrowserController\getCurrentPageId(), LiveSearch\getEditLink(), DataHandlerHook\getEmailsForStageChangeNotification(), PageLayoutController\getHeaderFlashMessagesForCurrentPid(), AbstractTreeView\getIcon(), UserFileInlineLabelService\getInlineLabel(), WorkspaceService\getLivePageUid(), StagesService\getNotificationMode(), ConditionMatcher\getPage(), DataHandler\getPreviousLocalizedRecordUid(), StagesService\getPropertyOfCurrentWorkspaceStage(), ActionHandler\getRecipientList(), RecordHistory\getRecord(), EditDocumentController\getRecordForEdit(), StagesService\getStageRecord(), TranslationConfigurationProvider\getSystemLanguages(), ActionTask\getTask(), ActionTask\getUsergroups(), WorkspaceService\getWorkspaceTitle(), AddController\init(), NewRecordController\init(), ShortcutToolbarItem\initShortcuts(), FileMetadataPermissionsAspect\isAllowedToShowEditForm(), ActionTask\isCreatedByUser(), BackendUserAuthentication\isInWebMount(), WorkspaceService\isNewPage(), ConditionMatcher\isNewPageWithPageId(), WorkspaceService\isPageAccessibleForCurrentUser(), DataHandler\isRecordUndeletable(), EditDocumentController\languageSwitch(), AbstractDatabaseRecordList\linkWrapItems(), SortPagesWizardModuleFunction\main(), CreatePagesWizardModuleFunctionController\main(), ListController\main(), MoveElementController\main(), LinkValidatorReport\main(), VersionModuleController\main(), ElementInformationController\makeRef(), ElementInformationController\makeRefFrom(), ImportExport\migrateLegacyImportRecords(), DataHandlerHook\moveRecord_wsPlaceholders(), DataHandler\placeholderShadowing(), ClickMenu\printDBClickMenu(), ClickMenu\printFileClickMenu(), ClickMenu\printNewDBLevel(), TreelistCacheUpdateHooks\processCmdmap_postProcess(), TreelistCacheUpdateHooks\processDatamap_afterDatabaseOperations(), CrawlerHook\processDatamap_afterDatabaseOperations(), ImportExport\processSoftReferences_substTokens(), QueryView\procesStoreControl(), BackendUserAuthentication\recordEditAccessInternals(), AdministrationRepository\saveKeywords(), ActionTask\saveNewBackendUser(), SuggestWizard\searchAction(), ActionHandler\sendToNextStageExecute(), ActionHandler\sendToNextStageWindow(), ActionHandler\sendToPrevStageExecute(), ActionHandler\sendToPrevStageWindow(), ActionHandler\sendToSpecificStageExecute(), ActionHandlerTest\sendToSpecificStageExecuteIgnoresDoublePublishes(), ImportExport\setFlexFormRelations(), ElementHistoryController\setPagePath(), BackendLayoutWizardController\setPagePath(), AdministrationController\statisticDetailsAction(), ActionHandler\swapSingleRecord(), AjaxController\switchWorkspaceAction(), TableController\tableWizard(), DeletedRecordsController\transform(), RteHtmlParser\TS_links_rte(), DataHandlerHook\version_clearWSID(), DataHandlerHook\version_setStage(), VersionModuleController\versioningMgm(), ActionTask\viewEditRecord(), ActionTask\viewNewBackendUser(), WorkspaceService\viewSingleRecord(), BackendUserAuthentication\workspaceCannotEditOfflineVersion(), BackendUserAuthentication\workspaceCannotEditRecord(), BackendUserAuthentication\workspaceCheckStageForCurrent(), and RelationHandler\writeForeignField().
|
static |
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.
array | $row | Table row; $row is a row from the table, $table |
string | $table | Table name |
Definition at line 1954 of file backend/Classes/Utility/BackendUtility.php.
References $lang.
Referenced by DocumentTemplate\getPageInfo(), PagePositionMap\getRecordHeader(), and InlineRecordContainer\renderForeignRecordHeader().
|
static |
Fetches the localization for a given record.
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: '') |
Definition at line 303 of file backend/Classes/Utility/BackendUtility.php.
References $GLOBALS.
Referenced by DataHandler\getPreviousLocalizedRecordUid().
|
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.
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) |
Definition at line 470 of file backend/Classes/Utility/BackendUtility.php.
References GeneralUtility\fixed_lgd_cs().
Referenced by SuggestWizardDefaultReceiver\getRecordPath(), ImportExportTask\main(), OuterWrapContainer\render(), and ActionTask\viewEditRecord().
|
static |
Returns the first record found from $table with $where as WHERE clause This function does NOT check if a record has the deleted flag set. $table does NOT need to be configured in $GLOBALS['TCA'] The query used is simply this: $query = 'SELECT ' . $fields . ' FROM ' . $table . ' WHERE ' . $where;
string | $table | Table name (not necessarily in TCA) |
string | $where | WHERE clause |
string | $fields | $fields is a list of fields to select, default is '*' |
Definition at line 161 of file backend/Classes/Utility/BackendUtility.php.
Referenced by DataHandler\deleteRecord(), DataHandler\doesRecordExist(), CleanerCommand\genTree_traverse(), and ReferenceIndex\updateRefIndexTable().
|
static |
Returns records from table, $theTable, where a field ($theField) equals the value, $theValue The records are returned in an array If no records were selected, the function returns nothing
string | $theTable | Table name present in $GLOBALS['TCA'] |
string | $theField | Field to select on |
string | $theValue | Value that $theField must match |
string | $whereClause | Optional additional WHERE clauses put in the end of the query. DO NOT PUT IN GROUP BY, ORDER BY or LIMIT! |
string | $groupBy | Optional GROUP BY field(s), if none, supply blank string. |
string | $orderBy | Optional ORDER BY field(s), if none, supply blank string. |
string | $limit | Optional LIMIT value ([begin,]max), if none, supply blank string. |
bool | $useDeleteClause | Use the deleteClause to check if a record is deleted (default TRUE) |
Definition at line 187 of file backend/Classes/Utility/BackendUtility.php.
References $GLOBALS.
Referenced by PageLinkHandler\canHandleLink(), BackendUserAuthentication\checkFullLanguagesAccess(), DataHandler\copyL10nOverlayRecords(), DataHandler\deleteL10nOverlayRecords(), DataHandler\getRecordsWithSameValue(), BackendController\handlePageEditing(), PageLayoutController\makeQuickEditMenu(), DataHandler\moveL10nOverlayRecords(), and RteHtmlParser\TS_links_rte().
|
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.
array | $fields | Fields to select |
string | $table | Table name |
string | $titleField | Field that will contain the record title |
string | $where | Additional where clause |
Definition at line 1419 of file backend/Classes/Utility/BackendUtility.php.
References ArrayUtility\sortArraysByKey().
|
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'
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). |
Definition at line 2172 of file backend/Classes/Utility/BackendUtility.php.
Referenced by ValidatorTask\buildMail(), IntegrityService\checkLocalization(), PageLinkHandler\expandPage(), ImportExport\export_addRecord(), RecordHistory\generateTitle(), ValidatorTask\getAdditionalInformation(), DocumentTemplate\getHeader(), PageLayoutController\getHeaderFlashMessagesForCurrentPid(), SuggestWizardDefaultReceiver\getLabel(), LinkAnalyzer\getLinkStatistics(), DocumentTemplate\getPageInfo(), LiveSearch\getRecordArray(), PagePositionMap\getRecordHeader(), MetaInformation\getRecordInformation(), DataHandler\getRecordPropertiesFromRow(), ElementBrowserRecordList\linkWrapItems(), AbstractDatabaseRecordList\linkWrapItems(), DatabaseIntegrityCheck\lostRecords(), MoveElementController\main(), LinkValidatorReport\main(), ImportExportController\makeConfigurationForm(), ElementInformationController\makeRef(), ElementInformationController\makeRefFrom(), VersionModuleController\pageSubContent(), Clipboard\printContentFromTab(), ClickMenu\printDBClickMenu(), RelationHandler\readyForInterface(), OuterWrapContainer\render(), DatabaseRecordList\renderListRow(), ElementInformationController\renderPageTitle(), DeletedRecordsController\transform(), VersionModuleController\versioningMgm(), and ActionTask\viewEditRecord().
|
static |
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.
string | $title | The title string to be cropped |
int | $titleLength | Crop title after this length - if not set, BE_USER->uc['titleLen'] is used |
Definition at line 2237 of file backend/Classes/Utility/BackendUtility.php.
Referenced by TcaRecordTitle\addData(), UserFileInlineLabelService\getInlineLabel(), ElementBrowserRecordList\linkWrapItems(), and OuterWrapContainer\render().
|
static |
Returns the combined markup for Bootstraps tooltips
array | $row | |
string | $table |
Definition at line 1938 of file backend/Classes/Utility/BackendUtility.php.
Referenced by PageLayoutView\getIcon(), PagePositionMap\getRecordHeader(), MetaInformation\getRecordInformation(), MoveElementController\main(), and DatabaseRecordList\renderListRow().
|
static |
Like getRecord(), but overlays workspace version if any.
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 blablabla = 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 |
Definition at line 129 of file backend/Classes/Utility/BackendUtility.php.
References GeneralUtility\inList(), and GeneralUtility\uniqueList().
Referenced by PageLinkHandler\canHandleLink(), PageLinkHandler\expandPage(), ExportPageTreeView\ext_tree(), PageLinkHandler\formatCurrentUrl(), AbstractDatabaseRecordList\generateList(), ConditionMatcher\getPageIdByRecord(), AbstractTreeView\getRecord(), DataProvider\getRecordWithWorkspaceOverlay(), BackendController\handlePageEditing(), ElementInformationController\initDatabaseRecord(), ElementInformationController\initFileOrFolderRecord(), TranslationStatusController\main(), InfoPageTyposcriptConfigController\main(), MoveElementController\main(), ImportExportController\makeConfigurationForm(), DataHandler\moveRecord_procFields(), Clipboard\printContentFromTab(), ClickMenu\printDBClickMenu(), ClickMenu\printNewDBLevel(), OuterWrapContainer\render(), InfoPageTyposcriptConfigController\renderList(), TypoScriptTemplateModuleController\renderList(), AjaxController\switchWorkspaceAction(), and TranslationConfigurationProvider\translationInfo().
|
static |
Returns all registered FlexForm definitions with title and fields
string | $table | The content table |
Definition at line 1135 of file backend/Classes/Utility/BackendUtility.php.
References $GLOBALS, GeneralUtility\getFileAbsFileName(), GeneralUtility\getUrl(), GeneralUtility\logDeprecatedFunction(), GeneralUtility\resolveAllSheetsInDS(), GeneralUtility\trimExplode(), and GeneralUtility\xml2array().
|
staticprotected |
Gets an instance of the runtime cache.
Definition at line 4090 of file backend/Classes/Utility/BackendUtility.php.
|
staticprotected |
Get the SignalSlot dispatcher
Definition at line 4866 of file backend/Classes/Utility/BackendUtility.php.
|
static |
Takes an array of "[key] = [value]" strings and returns an array with the keys set as keys pointing to the value. Better see it in action! Find example in Inside TYPO3
array | $pArr | Array of "[key] = [value]" strings to convert. |
Definition at line 949 of file backend/Classes/Utility/BackendUtility.php.
Referenced by RteHtmlParser\RTE_transform(), and DataHandler\transformRichtextContentToDatabase().
|
static |
Parses "defaultExtras" of $GLOBALS['TCA'] columns config section to an array. Elements are split by ":" and within those parts, parameters are split by "|".
See unit tests for details.
string | $defaultExtrasString | "defaultExtras" string from columns config |
string | $_,\xrefitem | deprecated 79. |
Definition at line 916 of file backend/Classes/Utility/BackendUtility.php.
References GeneralUtility\deprecationLog(), and GeneralUtility\trimExplode().
Referenced by DataHandler\checkValue_flex_procInData_travDS(), BackendUtilityTest\getSpecConfPartsSplitsDefaultExtras(), RsaInputElement\render(), SelectMultipleSideBySideElement\render(), SelectSingleBoxElement\render(), SelectCheckBoxElement\render(), TextElement\render(), SelectTreeElement\render(), RichTextElement\render(), and RichTextNodeResolver\resolve().
|
static |
Returns a list of pure ints based on $in_list being a list of records with table-names prepended. Ex: $in_list = "pages_4,tt_content_12,45" would result in a return value of "4,45" if $tablename is "pages" and $default_tablename is 'pages' as well.
string | $in_list | Input list |
string | $tablename | Table name from which ids is returned |
string | $default_tablename | $default_tablename denotes what table the number '45' is from (if nothing is prepended on the value) |
Definition at line 236 of file backend/Classes/Utility/BackendUtility.php.
References $list.
|
static |
Gets the TCA configuration of a field.
string | $table | Name of the table |
string | $field | Name of the field |
Definition at line 4798 of file backend/Classes/Utility/BackendUtility.php.
Referenced by ElementEntityProcessor\createNewDependentElementChildReferenceCallback(), and ElementEntityProcessor\createNewDependentElementParentReferenceCallback().
|
static |
Returns the "types" configuration parsed into an array for the record, $rec, from table, $table
string | $table | Table name (present in TCA) |
array | $rec | Record from $table |
bool | $useFieldNameAsKey | If $useFieldNameAsKey is set, then the fieldname is associative keys in the return array, otherwise just numeric keys. |
Definition at line 778 of file backend/Classes/Utility/BackendUtility.php.
References $GLOBALS, elseif, and GeneralUtility\trimExplode().
Referenced by DataHandler\fillInFieldArray().
|
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.
string | $table | Table name present in TCA |
array | $row | Record from $table |
\RuntimeException |
Definition at line 859 of file backend/Classes/Utility/BackendUtility.php.
References $GLOBALS, and elseif.
Referenced by DataHandler\checkValue_flex_procInData_travDS(), and DataHandler\fillInFieldArray().
|
static |
Returns TSConfig for the TCEFORM object in Page TSconfig. Used in TCEFORMs
string | $table | Table name present in TCA |
array | $row | Row from table |
Definition at line 3800 of file backend/Classes/Utility/BackendUtility.php.
Referenced by FormEngineUtility\getTSconfigForTableRow(), AddController\init(), ListController\main(), and NewContentElementController\removeInvalidElements().
|
static |
Returns single image tag to thumbnail using a thumbnail script (like thumbs.php)
string | $thumbScript | Must point to "thumbs.php" relative to the script position |
string | $theFile | Must be the proper reference to the file that thumbs.php should show |
string | $tparams | The additional attributes for the image tag |
string | $size | The size of the thumbnail send along to thumbs.php |
Definition at line 1827 of file backend/Classes/Utility/BackendUtility.php.
References $url.
|
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!
string | $table | Table name |
int | $uid | Record uid |
int | $pid | Record pid, could be negative then pointing to a record from same table whose pid to find and return |
Definition at line 3851 of file backend/Classes/Utility/BackendUtility.php.
Referenced by DataHandler\copyL10nOverlayRecords().
|
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.
string | $table | Table name |
int | $uid | Record uid |
int | $pid | Record pid |
Definition at line 3938 of file backend/Classes/Utility/BackendUtility.php.
|
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.
string | $table | Tablename |
string | $uid | UID value |
string | $pid | PID value |
Definition at line 3911 of file backend/Classes/Utility/BackendUtility.php.
Referenced by RichTextNodeResolver\resolve().
|
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
Definition at line 3377 of file backend/Classes/Utility/BackendUtility.php.
Referenced by DocumentTemplate\endPage(), and ModuleTemplate\renderContent().
|
static |
Generates a token and returns a parameter for the URL
string | $formName | Context of the token |
string | $tokenName | The name of the token GET variable |
\InvalidArgumentException |
Definition at line 3568 of file backend/Classes/Utility/BackendUtility.php.
|
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
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 |
Definition at line 1381 of file backend/Classes/Utility/BackendUtility.php.
References GeneralUtility\trimExplode().
Referenced by HistoryService\__construct(), PermissionController\editAction(), StagesService\getBackendUsers(), PermissionAjaxController\renderUserSelector(), StagesService\resolveBackendUserIds(), and SetupModuleController\simulateUser().
|
static |
Select the workspace version of a record, if exists
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 |
Definition at line 4461 of file backend/Classes/Utility/BackendUtility.php.
Referenced by ElementEntityProcessor\createNewDependentElementCallback(), EditDocumentController\getRecordForEdit(), TcaInline\getWorkspacedUids(), VersionsCommand\main(), DataHandlerHook\moveRecord(), DataHandlerHook\moveRecord_processFields(), DataHandlerHook\moveRecord_processFieldValue(), DataHandlerHook\processCmdmap_deleteAction(), RecordHistory\resolveElement(), DataHandler\versionizeRecord(), and BackendUserAuthentication\workspaceAllowAutoCreation().
|
static |
Get additional where clause to select records of a specific workspace (includes live as well).
string | $table | Table name |
int | $workspaceId | Workspace ID |
Definition at line 4534 of file backend/Classes/Utility/BackendUtility.php.
Referenced by DataHandlerHook\flushWorkspaceElements().
|
static |
Returns CSH help text (description), if configured for, as an array (title, description)
string | $table | Table name |
string | $field | Field name |
Definition at line 2759 of file backend/Classes/Utility/BackendUtility.php.
|
static |
Returns help-text icon if configured for. TCA_DESCR must be loaded prior to this function
Please note: since TYPO3 4.5 the UX team decided to not use CSH in its former way, but to wrap the given text (where before the help icon was, and you could hover over it) Please also note that since TYPO3 4.5 the option to enable help (none, icon only, full text) was completely removed.
string | $table | Table name |
string | $field | Field name |
string | $_ | UNUSED |
bool | $force | Force display of icon no matter BE_USER setting for help |
Definition at line 2743 of file backend/Classes/Utility/BackendUtility.php.
|
static |
Implodes a multi dimensional TypoScript array, $p, into a one-dimensional array (return value)
array | $p | TypoScript structure |
string | $k | Prefix string |
Definition at line 1352 of file backend/Classes/Utility/BackendUtility.php.
References GeneralUtility\logDeprecatedFunction().
|
static |
Returns TRUE if $modName is set and is found as a main- or submodule in $TBE_MODULES array
string | $modName | Module name |
Definition at line 4142 of file backend/Classes/Utility/BackendUtility.php.
References $list.
Referenced by VersionModuleController\adminLinks(), ClickMenu\DB_edit(), PreviewController\generateJavascript(), BackendController\generateJavascript(), AdminPanelView\getEditModule(), VersionModuleController\main(), and BackendUserAuthentication\modAccess().
|
static |
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.
string | $table | Table name |
int | $uid | Record uid |
Definition at line 3624 of file backend/Classes/Utility/BackendUtility.php.
Referenced by DatabaseRecordList\renderListRow(), and PageLayoutView\tt_content_drawHeader().
|
static |
Whether to ignore restrictions on root-level records. The regular behaviour is that records on the root-level (page-id 0) only can be accessed by admin users.
string | $table | Name of the table |
Definition at line 4828 of file backend/Classes/Utility/BackendUtility.php.
Referenced by DatabaseUserPermissionCheck\addData(), DataHandler\checkRecordInsertAccess(), DataHandler\doesRecordExist(), WorkspaceService\isPageAccessibleForCurrentUser(), DataHandler\isTableAllowedForThisPage(), and WorkspaceService\selectAllVersionsFromPages().
|
static |
Determines whether a table is localizable and has the languageField and transOrigPointerField set in $GLOBALS['TCA'].
string | $table | The table to check |
Definition at line 696 of file backend/Classes/Utility/BackendUtility.php.
References $GLOBALS.
Referenced by BackendUserAuthentication\checkFullLanguagesAccess(), IntegrityService\checkLocalization(), DataHandler\copyL10nOverlayRecords(), DataHandler\copySpecificPage(), DataHandler\deleteL10nOverlayRecords(), GridDataService\getLanguageValue(), WorkspaceService\isLanguageAccessibleForCurrentUser(), PlainDataResolver\isLocalizationEnabled(), DataHandler\moveL10nOverlayRecords(), ClickMenu\printDBClickMenu(), WorkspaceService\selectAllVersionsFromPages(), and WorkspaceService\viewSingleRecord().
|
static |
Determines whether a table is aware of using move placeholders, which means 'versioningWS' is set to 2. As of TYPO3 CMS 7, move placeholders is used as default so the method is obsolete.
string | $table |
Definition at line 4786 of file backend/Classes/Utility/BackendUtility.php.
|
static |
Determines whether a table is enabled for workspaces.
string | $table | Name of the table to be checked |
Definition at line 4772 of file backend/Classes/Utility/BackendUtility.php.
Referenced by ElementEntityProcessor\createNewDependentElementCallback(), DataHandler\deleteL10nOverlayRecords(), Typo3DbBackend\doLanguageAndWorkspaceOverlay(), DataHandlerHook\flushWorkspaceElements(), TcaInline\getWorkspacedUids(), PlainDataResolver\isWorkspaceEnabled(), VersionsCommand\main(), DataHandlerHook\moveRecord(), DataHandlerHook\moveRecord_processFieldValue(), RelationHandler\purgeItemArrayHandler(), RelationHandler\readForeignField(), RelationHandler\readList(), DataHandlerHook\resetStageOfElements(), DataHandlerHook\version_clearWSID(), and RelationHandler\writeForeignField().
|
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.
string | $table | Name of the table |
Definition at line 4815 of file backend/Classes/Utility/BackendUtility.php.
Referenced by DataHandler\doesRecordExist().
|
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!
string | $table | Table name |
int | $uid | Record uid |
int | $pid | Record pid |
Definition at line 3590 of file backend/Classes/Utility/BackendUtility.php.
References if.
Referenced by RecordList\mainAction(), and EditDocumentController\mainAction().
|
static |
Makes a form for configuration of some values based on configuration found in the array $configArray, with default values from $defaults and a data-prefix $dataPrefix <form>-tags must be supplied separately Needs more documentation and examples, in particular syntax for configuration array. See Inside TYPO3. That's were you can expect to find example, if anywhere.
array | $configArray | Field configuration code. |
array | $defaults | Defaults |
string | $dataPrefix | Prefix for formfields |
Definition at line 2673 of file backend/Classes/Utility/BackendUtility.php.
|
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)
string | $table | Table name |
array | $row | Row (passed by reference) - must be online record! |
Definition at line 4429 of file backend/Classes/Utility/BackendUtility.php.
Referenced by VersionsCommand\main().
|
static |
Opens the page tree to the specified page id
int | $pid | Page id. |
bool | $clearExpansion | If set, then other open branches are closed. |
Definition at line 430 of file backend/Classes/Utility/BackendUtility.php.
Referenced by BackendController\handlePageEditing().
|
static |
Returns an array with key=>values based on input text $params $params is exploded by line-breaks and each line is supposed to be on the syntax [key] = [some value] These pairs will be parsed into an array an returned.
string | $params | String of parameters on multiple lines to parse into key-value pairs (see function description) |
Definition at line 4730 of file backend/Classes/Utility/BackendUtility.php.
|
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)
int | $id | Page uid for which to check read-access |
string | $perms_clause | This is typically a value generated with static::getBackendUserAuthentication()->getPagePermsClause(1); |
Definition at line 745 of file backend/Classes/Utility/BackendUtility.php.
Referenced by SuggestWizardDefaultReceiver\checkRecordAccess(), ViewModuleController\getAdminCommand(), LiveSearch\getEditLink(), RecordHistory\hasPageAccess(), NewContentElementController\init(), NewRecordController\init(), PageLayoutController\init(), ElementInformationController\initDatabaseRecord(), LinkValidatorReport\initialize(), PermissionController\initializeAction(), PageTreeNavigationController\initializeTemporaryDBmount(), InfoModuleController\main(), PageFunctionsController\main(), MoveElementController\main(), ImportExportController\main(), VersionModuleController\main(), DataHandlerHook\moveRecord_wsPlaceholders(), PagePathViewHelper\renderStatic(), ElementHistoryController\setPagePath(), BackendLayoutWizardController\setPagePath(), and ActionTask\viewRecordList().
|
static |
Counting references to a record/file
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 PATH_site) |
string | $msg | Message with s, eg. "There were s records pointing to this file! |
string | NULL | $count | Reference count |
Definition at line 4166 of file backend/Classes/Utility/BackendUtility.php.
Referenced by ClickMenu\DB_delete(), and ClickMenu\FILE_delete().
|
staticprotected |
Replace field values in given row with values from the original language if l10n_mode TCA settings require to do so.
string | $table | Table name |
array | $row | Row to fill with original language values |
Definition at line 2140 of file backend/Classes/Utility/BackendUtility.php.
|
static |
Replaces all special markers in a where clause. Special markers are:
string | $whereClause | Where clause with markers |
string | $table | Name of the table of the current record row |
string | $field | Field name |
array | $tsConfig | TSconfig array from which to get further configuration settings for the field name |
Definition at line 3751 of file backend/Classes/Utility/BackendUtility.php.
|
static |
Returns first possible RTE object if available. Usage: $RTEobj = BackendUtility::RTEgetObj();
Definition at line 4023 of file backend/Classes/Utility/BackendUtility.php.
|
static |
Returns processed RTE setup from an array with TSconfig. Merges table and type specific RTE configuration into 'default.'
array | $RTEprop | The properties of Page TSconfig in the key "RTE. |
string | $table | Table name |
string | $field | Field name |
string | $type | Type value of the current record (like from CType of tt_content) |
Definition at line 4002 of file backend/Classes/Utility/BackendUtility.php.
Referenced by DataHandler\checkValue_flex_procInData_travDS(), DataHandler\fillInFieldArray(), BrowseLinksController\initVariables(), RichTextElement\render(), and RichTextNodeResolver\resolve().
|
static |
Select all versions of a record, ordered by version id (DESC)
string | $table | Table name to select from |
int | $uid | Record uid for which to find versions. |
string | $fields | Field list to select |
int | NULL | $workspace | Search 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 |
Definition at line 4223 of file backend/Classes/Utility/BackendUtility.php.
References elseif.
Referenced by DataHandler\deleteVersionsForRecord(), CleanerCommand\genTree_traverse(), VersionModuleController\lookForOwnVersions(), VersionsCommand\main(), and VersionModuleController\versioningMgm().
|
static |
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.
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 |
Definition at line 3353 of file backend/Classes/Utility/BackendUtility.php.
Referenced by EditDocumentController\closeDocument(), FileController\finish(), SortPagesWizardModuleFunction\main(), CreatePagesWizardModuleFunctionController\main(), SimpleDataHandlerController\main(), SetupModuleController\main(), and FileController\mainAction().
|
static |
Exists already a shortcut entry for this TYPO3 url?
string | $url |
Definition at line 4840 of file backend/Classes/Utility/BackendUtility.php.
References $url.
Referenced by ModuleTemplate\makeShortcutIcon(), DocumentTemplate\makeShortcutIcon(), and ShortcutToolbarItem\tryAddingTheShortcut().
|
static |
Returns soft-reference parser for the softRef processing type Usage: $softRefObj = &BackendUtility::softRefParserObj('[parser key]');
string | $spKey | softRef parser key |
Definition at line 4059 of file backend/Classes/Utility/BackendUtility.php.
References elseif.
Referenced by ReferenceIndex\getRelations(), and ReferenceIndex\getRelations_flexFormCallBack().
|
static |
Makes an backwards explode on the $str and returns an array with ($table, $uid). Example: tt_content_45 => array('tt_content', 45)
string | $str | [tablename]_[uid] string to explode |
Definition at line 221 of file backend/Classes/Utility/BackendUtility.php.
Referenced by UserFileInlineLabelService\getInlineLabel(), TcaInputPlaceholders\getRelatedGroupFieldUids(), and InlineRecordContainer\renderForeignRecordHeader().
|
static |
Returns $value (in seconds) formatted as hh:mm:ss For instance $value = 3600 + 60*2 + 3 should return "01:02:03"
int | $value | Time stamp, seconds |
bool | $withSeconds | Output hh:mm:ss. If FALSE: hh:mm |
Definition at line 1570 of file backend/Classes/Utility/BackendUtility.php.
Referenced by TcaRecordTitle\getRecordTitleForInputType().
|
static |
Returns alt="" and title="" attributes with the value of $content.
string | $content | Value for 'alt' and 'title' attributes (will be htmlspecialchars()'ed before output) |
Definition at line 1635 of file backend/Classes/Utility/BackendUtility.php.
|
static |
Returns title-attribute information for a page-record informing about id, alias, doktype, hidden, starttime, endtime, fe_group etc.
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 |
Definition at line 1848 of file backend/Classes/Utility/BackendUtility.php.
Referenced by BrowseTreeView\getTitleAttrib(), and CreatePagesWizardModuleFunctionController\main().
|
static |
Counting translations of records
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! |
Definition at line 4194 of file backend/Classes/Utility/BackendUtility.php.
Referenced by ClickMenu\DB_delete(), and PageLayoutView\tt_content_drawHeader().
|
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.
Definition at line 4654 of file backend/Classes/Utility/BackendUtility.php.
References $lang.
Referenced by ModulesController\indexAction().
|
static |
Removes menu items from $itemArray if they are configured to be removed by TSconfig for the module ($modTSconfig) See Inside TYPO3 about how to program modules and use this API.
array | $modTSconfig | Module TS config array |
array | $itemArray | Array of items from which to remove items. |
string | $TSref | $TSref points to the "object string" in $modTSconfig |
Definition at line 3330 of file backend/Classes/Utility/BackendUtility.php.
Referenced by PageLayoutController\makeActionMenu(), TaskModuleController\menuConfig(), and BaseScriptClass\menuConfig().
|
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)
string | $table | Table name |
Definition at line 4518 of file backend/Classes/Utility/BackendUtility.php.
Referenced by DatabasePageLanguageOverlayRows\addData(), EditDocumentController\editRegularContentFromId(), PageLayoutController\exec_languageQuery(), PageLinkHandler\expandPage(), AbstractDatabaseRecordList\generateList(), TranslationStatusController\getContentElementCount(), AbstractTreeView\getCount(), AbstractTreeView\getDataInit(), TranslationStatusController\getLangStatus(), PageLayoutController\getLocalizedPageTitle(), PageLayoutController\getNumberOfHiddenElements(), InfoPageTyposcriptConfigController\getOverviewOfPagesUsingTSConfig(), LocalizationController\getRecordsToCopyDatabaseResult(), ShortcutToolbarItem\getShortcutIcon(), PageLayoutView\getTable_pages(), PageLayoutView\getTableMenu(), DataProvider\getWhereClause(), AbstractRecordList\initializeLanguages(), EditDocumentController\languageSwitch(), EditDocumentController\localizationRedirect(), PageLayoutController\makeButtons(), AbstractDatabaseRecordList\makeQueryArray(), LiveSearch\makeQuerySearchByTable(), PageLayoutController\makeQuickEditMenu(), PageLayoutView\numberOfRecords(), PagePositionMap\printContentElementColumns(), and TranslationConfigurationProvider\translationInfo().
|
static |
Returns a JavaScript string for viewing the page id, $id It will detect the correct domain name if needed and provide the link with the right back path. Also it will re-use any window already open.
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. |
Definition at line 2931 of file backend/Classes/Utility/BackendUtility.php.
Referenced by VersionModuleController\adminLinks(), ClickMenu\DB_view(), EditDocumentController\generatePreviewCode(), InfoModuleController\getButtons(), PageFunctionsController\getButtons(), DatabaseRecordList\getButtons(), VersionModuleController\getButtons(), ImportExportController\getButtons(), NewRecordController\getButtons(), TypoScriptTemplateModuleController\getButtons(), DatabaseRecordList\getDocHeaderButtons(), ElementInformationController\getRecordActions(), AbstractDatabaseRecordList\linkWrapItems(), PageLayoutController\main(), PageLayoutController\makeButtons(), TranslationStatusController\renderL10nTable(), BackendUtilityTest\viewOnClickReturnsOnClickCodeWithAlternativeUrl(), DocumentTemplate\viewPageIcon(), and WorkspaceService\viewSingleRecord().
|
static |
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.
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 |
Definition at line 4352 of file backend/Classes/Utility/BackendUtility.php.
Referenced by WorkspaceService\canCreatePreviewLink(), DataHandler\deleteL10nOverlayRecords(), ImportExport\export_addRecord(), ExtendedTemplateService\ext_getAllTemplates(), ExtendedTemplateService\ext_getFirstTemplate(), DataHandler\fillInFieldArray(), DataHandlerHook\findPageElementsForVersionSwap(), DataHandlerHook\findPageIdsForVersionStateChange(), AbstractTreeView\getDataNext(), TranslationStatusController\getLangStatus(), PageLayoutView\getNonTranslatedTTcontentUids(), BackendLayoutView\getPage(), RecyclerUtility\getRecordPath(), DataHandler\getRecordProperties(), PageLayoutView\getResult(), PageLayoutView\getTable_pages(), BackendController\handlePageEditing(), CreatePagesWizardModuleFunctionController\main(), PageLayoutView\makeOrdinaryList(), PageLayoutController\makeQuickEditMenu(), SuggestWizardDefaultReceiver\makeWorkspaceOverlay(), PageLayoutView\pages_getTree(), PagePositionMap\printContentElementColumns(), DataHandler\remapListedDBRecords(), DataHandler\updateFlexFormData(), and TemplateService\versionOL().
|
static |
Makes click menu link (context sensitive menu)
Returns $str wrapped in a link which will activate the context sensitive menu for the record ($table/$uid) or file ($table = file) The link will load the top frame with the parameter "&item" which is the table, uid and listFrame arguments imploded by "|": rawurlencode($table.'|'.$uid.'|'.$listFr)
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 | $uid | If icon is for database record this is the UID for the record from $table |
bool | $listFrame | Tells the top frame script that the link is coming from a "list" frame which means a frame from within the backend content frame. |
string | $addParams | Additional GET parameters for the link to the ClickMenu AJAX request |
string | $enDisItems | Enable / Disable click menu items. Example: "+new,view" will display ONLY these two items (and any spacers in between), "new,view" will display all BUT these two items. |
bool | $returnTagParameters | If set, will return only the onclick JavaScript, not the whole link. |
Definition at line 2986 of file backend/Classes/Utility/BackendUtility.php.
Referenced by FileList\getButtonsAndOtherMarkers(), DocumentTemplate\getHeader(), PageLayoutView\getIcon(), DocumentTemplate\getPageInfo(), MetaInformation\getRecordInformation(), DocumentTemplate\getResourceHeader(), AbstractContainer\previewFieldValue(), OuterWrapContainer\render(), TranslationStatusController\renderL10nTable(), DatabaseRecordList\renderListRow(), DocumentTemplate\wrapClickMenuOnIcon(), BrowseTreeView\wrapIcon(), FolderTreeView\wrapIcon(), PageTreeView\wrapTitle(), and FolderTreeView\wrapTitle().
|
static |
Performs mapping of new uids to new versions UID in case of import inside a workspace.
string | $table | Table name |
int | $uid | Record uid (of live record placeholder) |
Definition at line 4604 of file backend/Classes/Utility/BackendUtility.php.
Referenced by DataHandler\copyRecord_raw(), DataHandler\dbAnalysisStoreExec(), ImportExport\processSoftReferences_substTokens(), DataHandler\remapListedDBRecords(), ImportExport\setFlexFormRelations(), and ImportExport\setRelations().
|
staticprotected |
Definition at line 61 of file backend/Classes/Utility/BackendUtility.php.