Documentation TYPO3 par Ameos

t3lib_BEfunc Class Reference

List of all members.

Public Member Functions

 deleteClause ($table, $tableAlias='')
 getRecord ($table, $uid, $fields='*', $where='', $useDeleteClause=true)
 getRecordWSOL ($table, $uid, $fields='*', $where='', $useDeleteClause=true)
 getRecordRaw ($table, $where='', $fields='*')
 getRecordsByField ($theTable, $theField, $theValue, $whereClause='', $groupBy='', $orderBy='', $limit='', $useDeleteClause=true)
 searchQuery ($searchWords, $fields, $table='')
 listQuery ($field, $value)
 splitTable_Uid ($str)
 getSQLselectableList ($in_list, $tablename, $default_tablename)
 BEenableFields ($table, $inv=0)
 mm_query ($select, $local_table, $mm_table, $foreign_table, $whereClause='', $groupBy='', $orderBy='', $limit='')
 DBcompileInsert ($table, $fields_values)
 DBcompileUpdate ($table, $where, $fields_values)
 BEgetRootLine ($uid, $clause='', $workspaceOL=FALSE)
 openPageTree ($pid, $clearExpansion)
 getRecordPath ($uid, $clause, $titleLimit, $fullTitleLimit=0)
 getExcludeFields ()
 getExplicitAuthFieldValues ()
 getSystemLanguages ()
 readPageAccess ($id, $perms_clause)
 getTCAtypes ($table, $rec, $useFieldNameAsKey=0)
 getTCAtypeValue ($table, $rec)
 getSpecConfParts ($str, $defaultExtras)
 getSpecConfParametersFromArray ($pArr)
 getFlexFormDS ($conf, $row, $table, $fieldName='', $WSOL=TRUE, $newRecordPidValue=0)
 storeHash ($hash, $data, $ident)
 getHash ($hash, $expTime=0)
 getPagesTSconfig ($id, $rootLine='', $returnPartArray=0)
 updatePagesTSconfig ($id, $pageTS, $TSconfPrefix, $impParams='')
 implodeTSParams ($p, $k='')
 getUserNames ($fields='username, usergroup, usergroup_cached_list, uid', $where='')
 getGroupNames ($fields='title, uid', $where='')
 getListGroupNames ($fields='title, uid')
 blindUserNames ($usernames, $groupArray, $excludeBlindedFlag=0)
 blindGroupNames ($groups, $groupArray, $excludeBlindedFlag=0)
 daysUntil ($tstamp)
 date ($tstamp)
 datetime ($value)
 time ($value)
 calcAge ($seconds, $labels= 'min|hrs|days|yrs')
 dateTimeAge ($tstamp, $prefix=1, $date='')
 titleAttrib ($content='', $hsc=0)
 titleAltAttrib ($content)
 thumbCode ($row, $table, $field, $backPath, $thumbScript='', $uploaddir=NULL, $abs=0, $tparams='', $size='')
 getThumbNail ($thumbScript, $theFile, $tparams='', $size='')
 titleAttribForPages ($row, $perms_clause='', $includeAttrib=1)
 getRecordIconAltText ($row, $table='pages')
 getLabelFromItemlist ($table, $col, $key)
 getItemLabel ($table, $col, $printAllWrap='')
 getRecordTitle ($table, $row, $prep=FALSE, $forceResult=TRUE)
 getRecordTitlePrep ($title, $titleLength=0)
 getNoRecordTitle ($prep=FALSE)
 getProcessedValue ($table, $col, $value, $fixed_lgd_chars=0, $defaultPassthrough=0, $noRecordLookup=FALSE, $uid=0, $forceResult=TRUE)
 getProcessedValueExtra ($table, $fN, $fV, $fixed_lgd_chars=0, $uid=0, $forceResult=TRUE)
 getFileIcon ($ext)
 getCommonSelectFields ($table, $prefix='', $fields=array())
 makeConfigForm ($configArray, $defaults, $dataPrefix)
 helpTextIcon ($table, $field, $BACK_PATH, $force=0)
 helpText ($table, $field, $BACK_PATH, $styleAttrib='')
 cshItem ($table, $field, $BACK_PATH, $wrap='', $onlyIconMode=FALSE, $styleAttrib='')
 editOnClick ($params, $backPath='', $requestUri='')
 viewOnClick ($id, $backPath='', $rootLine='', $anchor='', $altUrl='', $addGetVars='', $switchFocus=TRUE)
 getModTSconfig ($id, $TSref)
 getFuncMenu ($mainParams, $elementName, $currentValue, $menuItems, $script='', $addparams='')
 getFuncCheck ($mainParams, $elementName, $currentValue, $script='', $addparams='', $tagParams='')
 getFuncInput ($mainParams, $elementName, $currentValue, $size=10, $script="", $addparams="")
 unsetMenuItems ($modTSconfig, $itemArray, $TSref)
 getSetUpdateSignal ($set='')
 getModuleData ($MOD_MENU, $CHANGED_SETTINGS, $modName, $type='', $dontValidateList='', $setDefaultList='')
 compilePreviewKeyword ($getVarsStr, $beUserUid, $ttl=172800)
 lockRecords ($table='', $uid=0, $pid=0)
 isRecordLocked ($table, $uid)
 exec_foreign_table_where_query ($fieldValue, $field='', $TSconfig=array(), $prefix='')
 getTCEFORM_TSconfig ($table, $row)
 getTSconfig_pidValue ($table, $uid, $pid)
 getPidForModTSconfig ($table, $uid, $pid)
 getTSCpid ($table, $uid, $pid)
 firstDomainRecord ($rootLine)
 getDomainStartPage ($domain, $path='')
 RTEsetup ($RTEprop, $table, $field, $type='')
RTEgetObj ()
softRefParserObj ($spKey)
 explodeSoftRefParserList ($parserList)
 isModuleSetInTBE_MODULES ($modName)
 referenceCount ($table, $ref, $msg='')
 selectVersionsOfRecord ($table, $uid, $fields='*', $workspace=0, $includeDeletedRecords=FALSE)
 fixVersioningPid ($table, &$rr, $ignoreWorkspaceMatch=FALSE)
 workspaceOL ($table, &$row, $wsid=-99)
 getWorkspaceVersionOfRecord ($workspace, $table, $uid, $fields='*')
 getLiveVersionOfRecord ($table, $uid, $fields='*')
 isPidInVersionizedBranch ($pid, $table='', $returnStage=FALSE)
 versioningPlaceholderClause ($table)
 countVersionsOfRecordsOnPage ($workspace, $pageId, $allTables=FALSE)
 wsMapId ($table, $uid)
 typo3PrintError ($header, $text, $js='', $head=1)
 TYPO3_copyRightNotice ()
 displayWarningMessages ()
 getPathType_web_nonweb ($path)
 ADMCMD_previewCmds ($pageinfo)
 processParams ($params)
 getListOfBackendModules ($name, $perms_clause, $backPath='', $script='index.php')

Detailed Description

Definition at line 185 of file class.t3lib_befunc.php.


Member Function Documentation

t3lib_BEfunc::deleteClause ( table,
tableAlias = '' 
)

Returns the WHERE clause " AND NOT [tablename].[deleted-field]" if a deleted-field is configured in $TCA for the tablename, $table This function should ALWAYS be called in the backend for selection on tables which are configured in 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. Usage: 71

Parameters:
string Table name present in $TCA
string Table alias if any
Returns:
string WHERE clause for filtering out deleted records, eg " AND tablename.deleted=0"

Definition at line 206 of file class.t3lib_befunc.php.

Referenced by t3lib_TCEmain::addDefaultPermittedLanguageIfNotSet(), wslib::autoPublishWorkspaces(), BEgetRootLine(), tx_rtehtmlarea_base::buildJSAcronymArray(), t3lib_userAuthGroup::checkWorkspace(), SC_mod_user_ws_workspaceForms::checkWorkspaceAccess(), tx_indexedsearch_crawler::cleanUpOldRunningConfigurations(), t3lib_admin::countRecords(), countVersionsOfRecordsOnPage(), tx_indexedsearch_crawler::crawler_execute_type1(), tx_indexedsearch_crawler::crawler_execute_type4(), tx_indexedsearch_crawler::crawler_init(), tx_rtehtmlarea_base::drawRTE(), SC_alt_doc::editRegularContentFromId(), exec_foreign_table_where_query(), SC_db_layout::exec_languageQuery(), SC_mod_tools_log_index::exec_listQueryPid(), browse_links::expandPage(), local_beUserAuth::ext_workspaceMembership(), t3lib_transferData::fetchRecord(), tx_version_cm1::formatWorkspace(), SC_mod_user_ws_index::formatWorkspace(), tx_lowlevel_cleaner_core::genTree(), t3lib_admin::genTree_records(), tx_lowlevel_cleaner_core::genTree_traverse(), t3lib_TCEforms::getAvailableLanguages(), t3lib_flexformtools::getAvailableLanguages(), tx_cms_webinfo_lang::getContentElementCount(), t3lib_treeView::getCount(), t3lib_treeView::getDataInit(), t3lib_TCEforms::getDefaultRecord(), t3lib_userAuthGroup::getDefaultWorkspace(), getDomainStartPage(), getFlexFormDS(), getGroupNames(), tx_cms_webinfo_lang::getLangStatus(), getListOfBackendModules(), SC_db_layout::getNumberOfHiddenElements(), getRecord(), tx_rtehtmlarea_dam_browse_media::getRecordOverlay(), getRecordPath(), getRecordsByField(), t3lib_queryGenerator::getSelectQuery(), tx_cms_webinfo_lang::getSystemLanguages(), getSystemLanguages(), localRecordList::getTable(), tx_cms_layout::getTable_pages(), tx_cms_layout::getTable_sys_note(), tx_cms_layout::getTable_tt_board(), tx_cms_layout::getTableMenu(), t3lib_queryGenerator::getTreeList(), t3lib_fullsearch::getTreeList(), getUserNames(), getWorkspaceVersionOfRecord(), t3lib_recordList::initializeLanguages(), SC_alt_doc::languageSwitch(), recordList::localizationRedirect(), SC_alt_doc::localizationRedirect(), tx_lowlevel_versions::main(), SC_mod_web_ts_index::main(), t3lib_queryGenerator::makeOptionList(), recordList::makeQueryArray(), t3lib_fullsearch::makeValueList(), tx_version_cm1::menuConfig(), SC_mod_user_ws_index::menuConfig(), t3lib_TCEmain::noRecordsFromUnallowedTables(), tx_cms_layout::numberOfRecords(), tx_version_cm1::pageSubContent(), t3lib_positionMap::printContentElementColumns(), tx_indexedsearch_crawler::processDatamap_afterDatabaseOperations(), t3lib_fullsearch::queryMaker(), t3lib_loadDBGroup::readForeignField(), SC_db_layout::renderQuickEdit(), t3lib_fullsearch::saveQueryInAction(), t3lib_fullsearch::search(), wslib::selectVersionsInWorkspace(), selectVersionsOfRecord(), recordList::showSysNotesForPage(), tx_version_cm1::subElements_getNonPageRecords(), SC_mod_user_ws_index::subElements_getNonPageRecords(), t3lib_admin::testDBRefs(), t3lib_transl8tools::translationInfo(), tx_version_cm1::versionsInOtherWS(), SC_mod_user_ws_index::versionsInOtherWS(), SC_mod_user_ws_index::workspaceList_getUserWorkspaceList(), and SC_alt_shortcut::workspaceSelector().

t3lib_BEfunc::getRecord ( table,
uid,
fields = '*',
where = '',
useDeleteClause = true 
)

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 $TCA Usage: 99

Parameters:
string Table name present in $TCA
integer UID of record
string List of fields to select
string Additional WHERE clause, eg. " AND blablabla=0"
boolean Use the deleteClause to check if a record is deleted (default true)
Returns:
array Returns the row if found, otherwise nothing

Definition at line 230 of file class.t3lib_befunc.php.

References deleteClause().

Referenced by tx_sysaction::action_t1_createUpdateBeUser(), t3lib_TCEforms_inline::checkAccess(), SC_wizard_rte::checkEditAccess(), t3lib_positionMap::checkNewPageInPid(), t3lib_clipboard::cleanCurrent(), tx_indexedsearch_crawler::crawler_execute_type4(), t3lib_TCEmain::deleteAction(), t3lib_TCEmain::deleteRecord_procFields(), tx_version_cm1::displayWorkspaceOverview_list(), SC_mod_user_ws_index::displayWorkspaceOverview_list(), SC_mod_user_ws_index::displayWorkspaceOverview_pageTreeIconTitle(), tx_impexp::doesRecordExist(), tslib_cObj::editIcons(), tx_impexp::export_addDBRelations(), t3lib_clipboard::exportClipElementParameters(), SC_mod_tools_log_index::exportData(), local_beUserAuth::ext_printOverview(), tx_sysaction::fixUserGroup(), fixVersioningPid(), SC_wizard_forms::formsWizard(), wsol_preview::generateUrls(), t3lib_TCEforms::getAdditionalPreviewLanguages(), t3lib_TCEforms::getAvailableLanguages(), t3lib_flexformtools::getAvailableLanguages(), wslib::getCmdArrayForPublishWS(), SC_wizard_forms::getConfigCode(), getFlexFormDS(), getLiveVersionOfRecord(), SC_alt_doc::getRecordForEdit(), getRecordWSOL(), t3lib_TCEforms_inline::getSingleField_typeInline(), t3lib_transl8tools::getSystemLanguages(), getTSconfig_pidValue(), template::getVersionSelector(), SC_wizard_add::init(), SC_show_item::init(), SC_db_new::init(), recordList::linkWrapItems(), t3lib_TCEmain::localize(), SC_wizard_rte::main(), SC_wizard_list::main(), tx_wizardsortpages_webfunc_2::main(), tx_wizardcrpages_webfunc_2::main(), SC_move_el::main(), SC_logomenu::main(), SC_alt_shortcut::main(), tx_version_cm1::main(), localRecordList::makeControl(), SC_alt_doc::makeEditForm(), t3lib_TCEmain::notifyStageChange(), t3lib_TCEmain::notifyStageChange_getEmails(), t3lib_TCEmain::placeholderShadowing(), SC_alt_shortcut::preprocess(), clickMenu::printDBClickMenu(), clickMenu::printNewDBLevel(), SC_alt_doc::processData(), tx_indexedsearch_crawler::processDatamap_afterDatabaseOperations(), tx_indexedsearch_modfunc1::processPageKeywords(), tx_impexp::processSoftReferences(), tx_impexp::processSoftReferences_substTokens(), t3lib_fullsearch::procesStoreControl(), readPageAccess(), t3lib_userAuthGroup::recordEditAccessInternals(), tx_sysaction::renderActions(), t3lib_TCEforms_inline::renderForeignRecordHeaderControl(), local_beUserAuth::returnWebmounts(), tx_impexp::setFlexFormRelations(), tx_indexedsearch_modfunc1::showDetailsForPhash(), tx_version_cm1::subElements(), SC_mod_user_ws_index::subElements(), SC_mod_tools_be_user_index::switchUser(), SC_wizard_table::tableWizard(), t3lib_parsehtml_proc::TS_links_rte(), t3lib_TCEmain::version_clearWSID(), t3lib_TCEmain::version_swap(), tx_version_cm1::versioningMgm(), t3lib_userAuthGroup::workspaceCannotEditOfflineVersion(), t3lib_userAuthGroup::workspaceCannotEditRecord(), and t3lib_loadDBGroup::writeForeignField().

t3lib_BEfunc::getRecordWSOL ( table,
uid,
fields = '*',
where = '',
useDeleteClause = true 
)

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

Parameters:
string Table name present in $TCA
integer UID of record
string List of fields to select
string Additional WHERE clause, eg. " AND blablabla=0"
boolean Use the deleteClause to check if a record is deleted (default true)
Returns:
array Returns the row if found, otherwise nothing

Definition at line 253 of file class.t3lib_befunc.php.

References getRecord(), t3lib_div::inList(), t3lib_div::uniqueList(), and workspaceOL().

Referenced by t3lib_TCEmain::copyRecord(), t3lib_TCEforms::dbFileIcons(), tx_version_cm1::displayWorkspaceOverview_allStageCmd(), SC_alt_main::editPageHandling(), SC_alt_shortcut::editPageIdFunc(), browse_links::expandPage(), SC_mod_tools_log_index::exportData(), recordList::generateList(), getProcessedValue(), t3lib_clipboard::getSelectedRecord(), t3lib_TCEforms::getSingleField_typeGroup(), tx_cms_layout::getTable_tt_content(), t3lib_TCEmain::localize(), tx_infopagetsconfig_webinfo::main(), tx_cms_webinfo_lang::main(), SC_db_new_content_el::main(), SC_move_el::main(), SC_mod_tools_log_index::makeConfigurationForm(), t3lib_TCEmain::moveRecord_procFields(), browse_links::parseCurUrl(), t3lib_clipboard::printContentFromTab(), clickMenu::printDBClickMenu(), clickMenu::printNewDBLevel(), t3lib_TCEforms::registerDefaultLanguageData(), SC_mod_web_ts_index::renderList(), t3lib_TCEforms::replaceTableWrap(), titleAttribForPages(), t3lib_transl8tools::translationInfo(), and t3lib_tsparser_ext::upload_copy_file().

t3lib_BEfunc::getRecordRaw ( table,
where = '',
fields = '*' 
)

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 $TCA The query used is simply this: $query='SELECT '.$fields.' FROM '.$table.' WHERE '.$where; Usage: 5 (ext: sys_todos)

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

Definition at line 286 of file class.t3lib_befunc.php.

Referenced by t3lib_TCEmain::deleteRecord(), recordHistory::displayHistory(), recordHistory::displaySettings(), t3lib_TCEmain::doesRecordExist(), recordHistory::generateTitle(), tx_lowlevel_cleaner_core::genTree_traverse(), tx_lowlevel_missing_relations::main(), tx_lowlevel_cleanflexform::main_autoFix(), tx_lowlevel_cleanflexform::main_parseTreeCallBack(), tx_lowlevel_cleaner::quickDBlookUp(), and t3lib_refindex::updateRefIndexTable().

t3lib_BEfunc::getRecordsByField ( theTable,
theField,
theValue,
whereClause = '',
groupBy = '',
orderBy = '',
limit = '',
useDeleteClause = true 
)

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 Usage: 8

Parameters:
string Table name present in $TCA
string Field to select on
string Value that $theField must match
string Optional additional WHERE clauses put in the end of the query. DO NOT PUT IN GROUP BY, ORDER BY or LIMIT!
string Optional GROUP BY field(s), if none, supply blank string.
string Optional ORDER BY field(s), if none, supply blank string.
string Optional LIMIT value ([begin,]max), if none, supply blank string.
boolean Use the deleteClause to check if a record is deleted (default true)
Returns:
mixed Multidimensional array with selected records (if any is selected)

Definition at line 311 of file class.t3lib_befunc.php.

References deleteClause(), and versioningPlaceholderClause().

Referenced by SC_alt_main::editPageHandling(), SC_alt_shortcut::editPageIdFunc(), firstDomainRecord(), t3lib_softrefproc::getPageIdFromAlias(), tx_cms_layout::getTable_tt_content(), t3lib_TCEmain::localize(), browse_links::parseCurUrl(), SC_db_layout::renderQuickEdit(), and t3lib_parsehtml_proc::TS_links_rte().

t3lib_BEfunc::searchQuery ( searchWords,
fields,
table = '' 
)

Returns a WHERE clause which will make an AND search for the words in the $searchWords array in any of the fields in array $fields. Usage: 0

Parameters:
array Array of search words
array Array of fields
string Table in which we are searching (for DBAL detection of quoteStr() method)
Returns:
string WHERE clause for search
Deprecated:
Use $GLOBALS['TYPO3_DB']->searchQuery() directly!

Definition at line 344 of file class.t3lib_befunc.php.

t3lib_BEfunc::listQuery ( field,
value 
)

Returns a WHERE clause that can find a value ($value) in a list field ($field) For instance a record in the database might contain a list of numbers, "34,234,5" (with no spaces between). This query would be able to select that record based on the value "34", "234" or "5" regardless of their positioni in the list (left, middle or right). Is nice to look up list-relations to records or files in TYPO3 database tables. Usage: 0

Parameters:
string Table field name
string Value to find in list
Returns:
string WHERE clause for a query
Deprecated:
Use $GLOBALS['TYPO3_DB']->listQuery() directly!

Definition at line 359 of file class.t3lib_befunc.php.

t3lib_BEfunc::splitTable_Uid ( str  ) 

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

Parameters:
string [tablename]_[uid] string to explode
Returns:
array

Definition at line 371 of file class.t3lib_befunc.php.

Referenced by t3lib_TCEforms::getSingleField_typeGroup().

t3lib_BEfunc::getSQLselectableList ( in_list,
tablename,
default_tablename 
)

Returns a list of pure integers 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. Usage: 1 (t3lib_userauthgroup)

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

Definition at line 386 of file class.t3lib_befunc.php.

t3lib_BEfunc::BEenableFields ( table,
inv = 0 
)

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_EXEC_TIME"] is used for date. Usage: 5

Parameters:
string $table is the table from which to return enableFields WHERE clause. Table name must have a 'ctrl' section in $TCA.
boolean $inv means that the query will select all records NOT VISIBLE records (inverted selection)
Returns:
string WHERE clause part

Definition at line 414 of file class.t3lib_befunc.php.

Referenced by tx_rtehtmlarea_base::buildJSAcronymArray(), tx_rtehtmlarea_base::drawRTE(), SC_db_layout::getNumberOfHiddenElements(), tx_rtehtmlarea_dam_browse_media::getRecordOverlay(), tx_cms_layout::getTable_tt_content(), t3lib_positionMap::printContentElementColumns(), and SC_db_layout::renderQuickEdit().

t3lib_BEfunc::mm_query ( select,
local_table,
mm_table,
foreign_table,
whereClause = '',
groupBy = '',
orderBy = '',
limit = '' 
)

Returns a SELECT query, selecting fields ($select) from two/three tables joined $local_table and $mm_table is mandatory. $foreign_table is optional. The JOIN is done with [$local_table].uid <--> [$mm_table].uid_local / [$mm_table].uid_foreign <--> [$foreign_table].uid The function is very useful for selecting MM-relations between tables adhering to the MM-format used by TCE (TYPO3 Core Engine). See the section on $TCA in Inside TYPO3 for more details. DEPRECATED - Use $GLOBALS['TYPO3_DB']->exec_SELECT_mm_query() instead since that will return the result pointer while this returns the query. Using this function may make your application less fitted for DBAL later.

Parameters:
string Field list for SELECT
string Tablename, local table
string Tablename, relation table
string Tablename, foreign table
string Optional additional WHERE clauses put in the end of the query. DO NOT PUT IN GROUP BY, ORDER BY or LIMIT!
string Optional GROUP BY field(s), if none, supply blank string.
string Optional ORDER BY field(s), if none, supply blank string.
string Optional LIMIT value ([begin,]max), if none, supply blank string.
Returns:
string Full SQL query
Deprecated:
See also:
t3lib_DB::exec_SELECT_mm_query()

Definition at line 478 of file class.t3lib_befunc.php.

t3lib_BEfunc::DBcompileInsert ( table,
fields_values 
)

Creates an INSERT SQL-statement for $table from the array with field/value pairs $fields_values. DEPRECATED - $GLOBALS['TYPO3_DB']->INSERTquery() directly instead! But better yet, use $GLOBALS['TYPO3_DB']->exec_INSERTquery()

Parameters:
string Table name
array Field values as key=>value pairs.
Returns:
string Full SQL query for INSERT
Deprecated:

Definition at line 500 of file class.t3lib_befunc.php.

t3lib_BEfunc::DBcompileUpdate ( table,
where,
fields_values 
)

Creates an UPDATE SQL-statement for $table where $where-clause (typ. 'uid=...') from the array with field/value pairs $fields_values. DEPRECATED - $GLOBALS['TYPO3_DB']->UPDATEquery() directly instead! But better yet, use $GLOBALS['TYPO3_DB']->exec_UPDATEquery()

Parameters:
string Database tablename
string WHERE clause, eg. "uid=1"
array Field values as key=>value pairs.
Returns:
string Full SQL query for UPDATE
Deprecated:

Definition at line 514 of file class.t3lib_befunc.php.

t3lib_BEfunc::BEgetRootLine ( uid,
clause = '',
workspaceOL = FALSE 
)

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. Usage: 1

Parameters:
integer Page id for which to create the root line.
string $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.
boolean 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!
Returns:
array Root line array, all the way to the page tree root (or as far as $clause allows!)

Definition at line 544 of file class.t3lib_befunc.php.

References deleteClause(), fixVersioningPid(), and workspaceOL().

Referenced by clickMenu::DB_view(), SC_mod_user_ws_index::displayWorkspaceOverview(), t3lib_tsparser_ext::ext_prevPageWithTemplate(), getPagesTSconfig(), getTCEFORM_TSconfig(), SC_alt_doc::init(), t3lib_userAuthGroup::isInWebMount(), isPidInVersionizedBranch(), SC_wizard_rte::main(), SC_db_layout::main(), SC_mod_web_view_index::main(), SC_mod_web_ts_index::main(), and openPageTree().

t3lib_BEfunc::openPageTree ( pid,
clearExpansion 
)

Opens the page tree to the specified page id

Parameters:
integer Page id.
boolean If set, then other open branches are closed.
Returns:
void

Definition at line 605 of file class.t3lib_befunc.php.

References BEgetRootLine().

Referenced by SC_alt_main::editPageHandling(), and SC_alt_shortcut::editPageIdFunc().

t3lib_BEfunc::getRecordPath ( uid,
clause,
titleLimit,
fullTitleLimit = 0 
)

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. Usage: 15

Parameters:
integer Page uid for which to create record path
string $clause is additional where clauses, eg. "
integer Title limit
integer Title limit of Full title (typ. set to 1000 or so)
Returns:
mixed Path of record (string) OR array with short/long title if $fullTitleLimit is set.

Definition at line 650 of file class.t3lib_befunc.php.

References deleteClause(), fixVersioningPid(), and workspaceOL().

Referenced by SC_alt_shortcut::editPageIdFunc(), local_beUserAuth::ext_non_readAccessPages(), getProcessedValueExtra(), tx_impexp::getRecordPath(), t3lib_TCEforms::getRecordPath(), tx_impexp_modfunc1::main(), printAllPageTree_perms::printTree(), readPageAccess(), localRecordList::recPath(), tx_sysaction::renderActions(), and titleAttribForPages().

t3lib_BEfunc::getExcludeFields (  ) 

Returns an array with the exclude-fields as defined in TCA Used for listing the exclude-fields in be_groups forms Usage: 2 (t3lib_tceforms + t3lib_transferdata)

Returns:
array Array of arrays with excludeFields (fieldname, table:fieldname) from all TCA entries

Definition at line 693 of file class.t3lib_befunc.php.

References t3lib_div::loadTCA().

Referenced by t3lib_TCEforms::addSelectOptionsToItemArray(), and t3lib_transferData::selectAddSpecial().

t3lib_BEfunc::getExplicitAuthFieldValues (  ) 

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

Returns:
array Array with information from all of $TCA

Definition at line 723 of file class.t3lib_befunc.php.

References t3lib_div::loadTCA().

Referenced by t3lib_TCEforms::addSelectOptionsToItemArray(), local_beUserAuth::ext_printOverview(), and t3lib_transferData::selectAddSpecial().

t3lib_BEfunc::getSystemLanguages (  ) 

Returns an array with system languages:

Returns:
array Array with languages

Definition at line 794 of file class.t3lib_befunc.php.

References deleteClause().

Referenced by t3lib_TCEforms::addSelectOptionsToItemArray(), local_beUserAuth::ext_printOverview(), and t3lib_transferData::selectAddSpecial().

t3lib_BEfunc::readPageAccess ( id,
perms_clause 
)

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) Usage: 21

Parameters:
integer Page uid for which to check read-access
string $perms_clause is typically a value generated with $BE_USER->getPagePermsClause(1);
Returns:
array Returns page record if OK, otherwise false.

Definition at line 819 of file class.t3lib_befunc.php.

References fixVersioningPid(), getRecord(), getRecordPath(), and workspaceOL().

Referenced by SC_mod_tools_log_index::importData(), SC_db_new_content_el::init(), SC_db_layout::init(), SC_show_item::init(), SC_db_new::init(), SC_alt_db_navframe::initializeTemporaryDBmount(), SC_move_el::main(), SC_db_list::main(), SC_mod_web_view_index::main(), tx_version_cm1::main(), SC_mod_web_ts_index::main(), SC_mod_web_perm_index::main(), SC_mod_web_info_index::main(), SC_mod_web_func_index::main(), and t3lib_TCEforms_inline::renderForeignRecordHeaderControl().

t3lib_BEfunc::getTCAtypes ( table,
rec,
useFieldNameAsKey = 0 
)

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

Parameters:
string Table name (present in TCA)
array Record from $table
boolean If $useFieldNameAsKey is set, then the fieldname is associative keys in the return array, otherwise just numeric keys.
Returns:
array

Definition at line 850 of file class.t3lib_befunc.php.

References getSpecConfParts(), getTCAtypeValue(), t3lib_div::loadTCA(), and t3lib_div::trimExplode().

Referenced by t3lib_TCEmain::fillInFieldArray(), t3lib_TCEforms::getListedFields(), tx_cms_layout::getSpecConfForField(), t3lib_TCEforms::getSpecConfForField(), and t3lib_transferData::renderRecordRaw().

t3lib_BEfunc::getTCAtypeValue ( table,
rec 
)

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

Parameters:
string Table name present in TCA
array Record from $table
Returns:
string Field value
See also:
getTCAtypes()

Definition at line 903 of file class.t3lib_befunc.php.

References t3lib_div::loadTCA().

Referenced by t3lib_TCEmain::checkValue_flex_procInData_travDS(), t3lib_TCEmain::fillInFieldArray(), t3lib_TCEforms::getSingleField_typeText(), getTCAtypes(), getTCEFORM_TSconfig(), and tx_cms_layout::isRTEforField().

t3lib_BEfunc::getSpecConfParts ( str,
defaultExtras 
)

Parses a part of the field lists in the "types"-section of $TCA arrays, namely the "special configuration" at index 3 (position 4) Elements are splitted by ":" and within those parts, parameters are splitted by "|". Everything is returned in an array and you should rather see it visually than listen to me anymore now... Check out example in Inside TYPO3 Usage: 5

Parameters:
string Content from the "types" configuration of TCA (the special configuration) - see description of function
string The ['defaultExtras'] value from field configuration
Returns:
array

Definition at line 926 of file class.t3lib_befunc.php.

References t3lib_div::trimExplode().

Referenced by t3lib_TCEmain::checkValue_flex_procInData_travDS(), t3lib_TCEforms::getSpecConfFromString(), and getTCAtypes().

t3lib_BEfunc::getSpecConfParametersFromArray ( pArr  ) 

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 Usage: 6

Parameters:
array Array of "[key]=[value]" strings to convert.
Returns:
array

Definition at line 957 of file class.t3lib_befunc.php.

Referenced by t3lib_TCEforms::getSingleField_typeText(), tx_cms_layout::isRTEforField(), t3lib_parsehtml_proc::RTE_transform(), and t3lib_rteapi::transformContent().

t3lib_BEfunc::getFlexFormDS ( conf,
row,
table,
fieldName = '',
WSOL = TRUE,
newRecordPidValue = 0 
)

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. Usage: 5

Parameters:
array Field config array
array Record data
string The table name
string Optional fieldname passed to hook object
boolean Boolean; 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.
integer 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)
Returns:
mixed If array, the data structure was found and returned as an array. Otherwise (string) it is an error message.
See also:
t3lib_TCEforms::getSingleField_typeFlex()

Definition at line 987 of file class.t3lib_befunc.php.

References deleteClause(), fixVersioningPid(), t3lib_div::getFileAbsFileName(), getRecord(), t3lib_div::getUserObj(), t3lib_div::testInt(), workspaceOL(), and t3lib_div::xml2array().

Referenced by t3lib_TCEmain::checkValue_flex(), t3lib_TCEmain::copyRecord_procBasedOnFieldType(), t3lib_refindex::getRelations(), t3lib_TCEforms::getSingleField_typeFlex(), tx_impexp::processSoftReferences(), t3lib_TCEmain::remapListedDBRecords(), t3lib_transferData::renderRecord_flexProc(), tx_impexp::setFlexFormRelations(), t3lib_flexformtools::traverseFlexFormXMLData(), and tx_lowlevel_lost_files::tx_lowlevel_lost_files().

t3lib_BEfunc::storeHash ( hash,
data,
ident 
)

Stores the string value $data in the 'cache_hash' table with the hash key, $hash, and visual/symbolic identification, $ident IDENTICAL to the function by same name found in t3lib_page: Usage: 2

Parameters:
string 32 bit hash string (eg. a md5 hash of a serialized array identifying the data being stored)
string The data string. If you want to store an array, then just serialize it first.
string $ident is just a textual identification in order to inform about the content! May be 20 characters long.
Returns:
void

Definition at line 1116 of file class.t3lib_befunc.php.

References time().

Referenced by SC_view_help::createGlossaryIndex(), t3lib_userAuthGroup::fetchGroupData(), and getPagesTSconfig().

t3lib_BEfunc::getHash ( hash,
expTime = 0 
)

Retrieves the string content stored with hash key, $hash, in cache_hash IDENTICAL to the function by same name found in t3lib_page: Usage: 2

Parameters:
string Hash key, 32 bytes hex
integer $expTime represents the expire time in seconds. For instance a value of 3600 would allow cached content within the last hour, otherwise nothing is returned.
Returns:
string

Definition at line 1136 of file class.t3lib_befunc.php.

Referenced by SC_view_help::createGlossaryIndex(), t3lib_userAuthGroup::fetchGroupData(), and getPagesTSconfig().

t3lib_BEfunc::getPagesTSconfig ( id,
rootLine = '',
returnPartArray = 0 
)

Returns the Page TSconfig for page with id, $id Requires class "t3lib_TSparser" Usage: 26 (spec. in ext info_pagetsconfig)

Parameters:
integer Page uid for which to create Page TSconfig
array If $rootLine is an array, that is used as rootline, otherwise rootline is just calculated
boolean 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.
Returns:
array Page TSconfig
See also:
t3lib_TSparser

Definition at line 1172 of file class.t3lib_befunc.php.

References t3lib_div::array_merge_recursive_overrule(), BEgetRootLine(), t3lib_TSparser::checkIncludeLines_array(), getHash(), t3lib_div::makeInstance(), and storeHash().

Referenced by t3lib_TCEmain::checkValue_flex_procInData_travDS(), recordHistory::displayHistory(), tx_rtehtmlarea_base::drawRTE(), t3lib_TCEmain::fillInFieldArray(), getModTSconfig(), t3lib_TCEforms::getSingleField_typeText(), getTCEFORM_TSconfig(), t3lib_TCEmain::getTCEMAIN_TSconfig()