TYPO3CMS  8
 All Classes Namespaces Files Functions Variables Pages
AbstractDatabaseRecordList Class Reference
Inheritance diagram for AbstractDatabaseRecordList:
AbstractRecordList PageLayoutView DatabaseRecordList ElementBrowserRecordList ActionList

Public Member Functions

 start ($id, $table, $pointer, $search= '', $levels=0, $showLimit=0)
 
 generateList ()
 
 getTable ($tableName, $id, $fields= '')
 
 setDispFields ()
 
 thumbCode ($row, $table, $field)
 
 makeQueryArray ($table, $id, $addWhere= '', $fieldList= '*')
 
 getQueryBuilder (string $table, int $pageId, array $additionalConstraints=[], array $fields=['*'])
 
 setTotalItems (string $table, int $pageId, array $constraints)
 
 makeSearchString ($table, $currentPid=-1)
 
 linkWrapTable ($table, $code)
 
 linkWrapItems ($table, $uid, $code, $row)
 
 linkUrlMail ($code, $testString)
 
 listURL ($altId= '', $table= '-1', $exclList= '')
 
 requestUri ()
 
 makeFieldList ($table, $dontCheckUser=false, $addDateFields=false)
 
 localizationRedirect ($justLocalized)
 
 setOverrideUrlParameters (array $urlParameters)
 
 setTableDisplayOrder (array $orderInformation)
 
 getOverridePageIdList ()
 
 setOverridePageIdList (array $overridePageIdList)
 
- Public Member Functions inherited from AbstractRecordList
 __construct ()
 
 addElement ($h, $icon, $data, $rowParams= '', $_= '', $_2= '', $colType= 'td')
 
 writeTop ()
 
 fwd_rwd_nav ($table= '')
 
 fwd_rwd_HTML ($type, $pointer, $table= '')
 
 listURL ($altId= '', $table= '-1', $exclList= '')
 
 CBfunctions ()
 
 initializeLanguages ()
 
 languageFlag ($sys_language_uid, $addAsAdditionalText=true)
 

Public Attributes

 $tableList = ''
 
 $returnUrl = ''
 
 $thumbs = 0
 
 $itemsLimitPerTable = 20
 
 $itemsLimitSingleTable = 100
 
 $script = 'index.php'
 
 $allFields = 0
 
 $localizationView = false
 
 $csvOutput = false
 
 $sortField
 
 $sortRev
 
 $displayFields
 
 $duplicateField
 
 $id
 
 $table = ''
 
 $listOnlyInSingleTableMode = false
 
 $firstElementNumber = 0
 
 $searchString = ''
 
 $searchLevels = ''
 
 $showLimit = 0
 
 $perms_clause = ''
 
 $calcPerms = 0
 
 $clickTitleMode = ''
 
 $modSharedTSconfig = []
 
 $pageRecord = []
 
 $hideTables = ''
 
 $hideTranslations = ''
 
 $tableTSconfigOverTCA = []
 
 $tablesCollapsed = []
 
 $JScode = ''
 
 $HTMLcode = ''
 
 $iLimit = 0
 
 $eCounter = 0
 
 $totalItems = ''
 
 $recPath_cache = []
 
 $setFields = []
 
 $currentTable = []
 
 $duplicateStack = []
 
 $modTSconfig
 
- Public Attributes inherited from AbstractRecordList
 $iLimit = 10
 
 $leftMargin = 0
 
 $showIcon = 1
 
 $no_noWrap = 0
 
 $oddColumnsCssClass = ''
 
 $fieldArray = []
 
 $addElement_tdParams = []
 
 $addElement_tdCssClass = []
 
 $fixedL = 30
 
 $thisScript = ''
 
 $setLMargin = 1
 
 $counter = 0
 
 $totalItems = ''
 
 $firstElementNumber = 0
 
 $eCounter = 0
 
 $HTMLcode = ''
 
 $pageOverlays = []
 
 $languageIconTitles = []
 
 $translateTools
 

Protected Member Functions

 buildQueryParameters (string $table, int $pageId, array $fieldList=['*'], array $additionalConstraints=[])
 
 getSearchFields ($tableName)
 
 getPageIdConstraint (string $tableName)
 
 getBackendUserAuthentication ()
 
- Protected Member Functions inherited from AbstractRecordList
 determineScriptUrl ()
 
 getThisScript ()
 
 getTranslateTools ()
 
 generateReferenceToolTip ($references, $launchViewParameter= '')
 
 getLanguageService ()
 

Protected Attributes

 $overrideUrlParameters = []
 
 $overridePageIdList = []
 
 $tableDisplayOrder = []
 
- Protected Attributes inherited from AbstractRecordList
 $id = 0
 
 $iconFactory
 

Detailed Description

Child class for rendering of Web > List (not the final class) Shared between Web>List and Web>Page

See also

Definition at line 42 of file AbstractDatabaseRecordList.php.

Member Function Documentation

buildQueryParameters ( string  $table,
int  $pageId,
array  $fieldList = ['*'],
array  $additionalConstraints = [] 
)
protected

Return the query parameters to select the records from a table $table with pid = $this->pidList

Parameters
string$tableTable name
int$pageIdPage id Only used to build the search constraints, $this->pidList is used for restrictions
string[]$fieldList List of fields to select from the table
string[]$additionalConstraints Additional part for where clause
Returns
array

Definition at line 797 of file AbstractDatabaseRecordList.php.

References $GLOBALS, AbstractDatabaseRecordList\$perms_clause, AbstractDatabaseRecordList\$sortField, AbstractDatabaseRecordList\$table, AbstractDatabaseRecordList\getPageIdConstraint(), GeneralUtility\getUserObj(), GeneralUtility\inList(), AbstractDatabaseRecordList\makeFieldList(), GeneralUtility\makeInstance(), and AbstractDatabaseRecordList\makeSearchString().

Referenced by AbstractDatabaseRecordList\getQueryBuilder(), and AbstractDatabaseRecordList\setTotalItems().

getOverridePageIdList ( )
Returns
array

Definition at line 1387 of file AbstractDatabaseRecordList.php.

getPageIdConstraint ( string  $tableName)
protected

Build SQL fragment to limit a query to a list of page IDs based on the current search level setting.

Parameters
string$tableName
Returns
string

Definition at line 1407 of file AbstractDatabaseRecordList.php.

Referenced by AbstractDatabaseRecordList\buildQueryParameters(), AbstractDatabaseRecordList\generateList(), and AbstractDatabaseRecordList\makeQueryArray().

getQueryBuilder ( string  $table,
int  $pageId,
array  $additionalConstraints = [],
array  $fields = ['*'] 
)

Returns a QueryBuilder configured to select $fields from $table where the pid is restricted depending on the current searchlevel setting.

Parameters
string$tableTable name
int$pageIdPage id Only used to build the search constraints, getPageIdConstraint() used for restrictions
string[]$additionalConstraints Additional part for where clause
string[]$fields Field list to select, * for all
Returns

Definition at line 747 of file AbstractDatabaseRecordList.php.

References $fields, AbstractDatabaseRecordList\buildQueryParameters(), and GeneralUtility\makeInstance().

Referenced by PageLayoutView\getContentRecordsPerColumn(), and PageLayoutView\makeOrdinaryList().

getSearchFields (   $tableName)
protected

Fetches a list of fields to use in the Backend search for the given table.

Parameters
string$tableName
Returns
string[]

Definition at line 1005 of file AbstractDatabaseRecordList.php.

References AbstractRecordList\$fieldArray, $GLOBALS, AbstractDatabaseRecordList\$searchString, GeneralUtility\callUserFunction(), and GeneralUtility\trimExplode().

Referenced by AbstractDatabaseRecordList\makeSearchString().

getTable (   $tableName,
  $id,
  $fields = '' 
)

To be implemented in extending classes.

Parameters
string$tableName
int$id
string$fieldsList of fields to show in the listing. Pseudo fields will be added including the record header.
Returns
string HTML code

Definition at line 550 of file AbstractDatabaseRecordList.php.

Referenced by AbstractDatabaseRecordList\generateList().

linkUrlMail (   $code,
  $testString 
)

Wrapping input code in link to URL or email if $testString is either.

Parameters
string$codecode to wrap
string$testStringString which is tested for being a URL or email and which will be used for the link if so.
Returns
string Link-Wrapped $code value, if $testString was URL or email.

Definition at line 1113 of file AbstractDatabaseRecordList.php.

Referenced by DatabaseRecordList\renderListRow().

linkWrapItems (   $table,
  $uid,
  $code,
  $row 
)

Returns the title (based on $code) of a record (from table $table) with the proper link around (that is for 'pages'-records a link to the level of that record...)

Parameters
string$tableTable name
int$uidItem uid
string$codeItem title (not htmlspecialchars()'ed yet)
mixed[]$row Item row
Returns
string The item title. Ready for HTML output (is htmlspecialchars()'ed)

Definition at line 1054 of file AbstractDatabaseRecordList.php.

References AbstractDatabaseRecordList\$table, Permission\CONTENT_EDIT, BackendUtility\editOnClick(), AbstractDatabaseRecordList\getBackendUserAuthentication(), AbstractRecordList\getLanguageService(), BackendUtility\getRecord(), BackendUtility\getRecordTitle(), Permission\PAGE_EDIT, and BackendUtility\viewOnClick().

Referenced by DatabaseRecordList\renderListRow().

linkWrapTable (   $table,
  $code 
)

Returns the title (based on $code) of a table ($table) with the proper link around. For headers over tables. The link will cause the display of all extended mode or not for the table.

Parameters
string$tableTable name
string$codeTable label
Returns
string The linked table label

Definition at line 1037 of file AbstractDatabaseRecordList.php.

References AbstractDatabaseRecordList\$table, and AbstractDatabaseRecordList\listURL().

listURL (   $altId = '',
  $table = '-1',
  $exclList = '' 
)

Creates the URL to this script, including all relevant GPvars Fixed GPvars are id, table, imagemode, returnUrl, search_field, search_levels and showLimit The GPvars "sortField" and "sortRev" are also included UNLESS they are found in the $exclList variable.

Parameters
string$altIdAlternative id value. Enter blank string for the current id ($this->id)
string$tableTable name to display. Enter "-1" for the current table.
string$exclListComma separated list of fields NOT to include ("sortField", "sortRev" or "firstElementNumber")
Returns
string URL

Definition at line 1138 of file AbstractDatabaseRecordList.php.

Referenced by DatabaseRecordList\addSortLink(), DatabaseRecordList\fieldSelectBox(), DatabaseRecordList\getButtons(), DatabaseRecordList\getDocHeaderButtons(), AbstractDatabaseRecordList\linkWrapTable(), DatabaseRecordList\makeLocalizationPanel(), DatabaseRecordList\renderListHeader(), and DatabaseRecordList\renderListNavigation().

localizationRedirect (   $justLocalized)

Redirects to FormEngine if a record is just localized.

Parameters
string$justLocalizedString with table, orig uid and language separated by ":
Returns
void

Definition at line 1296 of file AbstractDatabaseRecordList.php.

Referenced by AbstractDatabaseRecordList\start().

makeFieldList (   $table,
  $dontCheckUser = false,
  $addDateFields = false 
)

Makes the list of fields to select for a table

Parameters
string$tableTable name
bool$dontCheckUserIf set, users access to the field (non-exclude-fields) is NOT checked.
bool$addDateFieldsIf set, also adds crdate and tstamp fields (note: they will also be added if user is admin or dontCheckUser is set)
Returns
string[] Array, where values are fieldnames to include in query

Definition at line 1209 of file AbstractDatabaseRecordList.php.

Referenced by AbstractDatabaseRecordList\buildQueryParameters(), DatabaseRecordList\fieldSelectBox(), AbstractDatabaseRecordList\generateList(), and AbstractDatabaseRecordList\makeQueryArray().

makeQueryArray (   $table,
  $id,
  $addWhere = '',
  $fieldList = '*' 
)

Returns the SQL-query array to select the records from a table $table with pid = $id

Parameters
string$tableTable name
int$idPage id (NOT USED! $this->pidSelect is used instead)
string$addWhereAdditional part for where clause
string$fieldListField list to select, * for all (for "SELECT [fieldlist] FROM ...")
Returns
string[] Returns query array
Deprecated:
since TYPO3 v8, will be removed in TYPO3 v9. Please use getQueryBuilder()

Definition at line 674 of file AbstractDatabaseRecordList.php.

References $GLOBALS, AbstractDatabaseRecordList\$id, AbstractDatabaseRecordList\$sortField, AbstractDatabaseRecordList\$table, BackendUtility\deleteClause(), AbstractDatabaseRecordList\getPageIdConstraint(), GeneralUtility\getUserObj(), GeneralUtility\logDeprecatedFunction(), AbstractDatabaseRecordList\makeFieldList(), AbstractDatabaseRecordList\makeSearchString(), GeneralUtility\trimExplode(), and BackendUtility\versioningPlaceholderClause().

makeSearchString (   $table,
  $currentPid = -1 
)

Creates part of query for searching after a word ($this->searchString) fields in input table.

Parameters
string$tableTable, in which the fields are being searched.
int$currentPidPage id for the possible search limit. -1 only if called from an old XCLASS.
Returns
string Returns part of WHERE-clause for searching, if applicable.

Definition at line 905 of file AbstractDatabaseRecordList.php.

References $GLOBALS, AbstractDatabaseRecordList\$table, AbstractDatabaseRecordList\getSearchFields(), GeneralUtility\inList(), and GeneralUtility\makeInstance().

Referenced by AbstractDatabaseRecordList\buildQueryParameters(), and AbstractDatabaseRecordList\makeQueryArray().

requestUri ( )

Returns "requestUri" - which is basically listURL

Returns
string Content of ->listURL()

Definition at line 1196 of file AbstractDatabaseRecordList.php.

setDispFields ( )

Setting the field names to display in extended list. Sets the internal variable $this->setFields

Returns
void

Definition at line 634 of file AbstractDatabaseRecordList.php.

References AbstractDatabaseRecordList\getBackendUserAuthentication().

setOverridePageIdList ( array  $overridePageIdList)
Parameters
int[]|array$overridePageIdList

Definition at line 1395 of file AbstractDatabaseRecordList.php.

setOverrideUrlParameters ( array  $urlParameters)

Set URL parameters to override or add in the listUrl() method.

Parameters
string[]$urlParameters
Returns
void

Definition at line 1346 of file AbstractDatabaseRecordList.php.

setTableDisplayOrder ( array  $orderInformation)

Set table display order information

Structure of $orderInformation: 'tableName' => [ 'before' => // comma-separated string list or array of table names 'after' => // comma-separated string list or array of table names ]

Parameters
array$orderInformation
Exceptions
UnexpectedValueException

Definition at line 1363 of file AbstractDatabaseRecordList.php.

setTotalItems ( string  $table,
int  $pageId,
array  $constraints 
)

Set the total items for the record list

Parameters
string$tableTable name
int$pageIdOnly used to build the search constraints, $this->pidList is used for restrictions
array$constraintsAdditional constraints for where clause

Definition at line 879 of file AbstractDatabaseRecordList.php.

References AbstractDatabaseRecordList\buildQueryParameters(), and GeneralUtility\makeInstance().

Referenced by PageLayoutView\makeOrdinaryList().

start (   $id,
  $table,
  $pointer,
  $search = '',
  $levels = 0,
  $showLimit = 0 
)

Initializes the list generation

Parameters
int$idPage id for which the list is rendered. Must be >= 0
string$tableTablename - if extended mode where only one table is listed at a time.
int$pointerBrowsing pointer.
string$searchSearch word, if any
int$levelsNumber of levels to search down the page tree
int$showLimitLimit of records to be listed.
Returns
void

Definition at line 350 of file AbstractDatabaseRecordList.php.

References $GLOBALS, AbstractDatabaseRecordList\$id, RecordList\$pointer, AbstractDatabaseRecordList\$returnUrl, AbstractDatabaseRecordList\$showLimit, AbstractDatabaseRecordList\$table, AbstractDatabaseRecordList\$tablesCollapsed, GeneralUtility\_GP(), AbstractDatabaseRecordList\getBackendUserAuthentication(), AbstractRecordList\initializeLanguages(), GeneralUtility\intExplode(), AbstractDatabaseRecordList\localizationRedirect(), GeneralUtility\makeInstance(), and GeneralUtility\sanitizeLocalUrl().

thumbCode (   $row,
  $table,
  $field 
)

Create thumbnail code for record/field

Parameters
mixed[]$row Record array
string$tableTable (record is from)
string$fieldField name for which thumbnail are to be rendered.
Returns
string HTML for thumbnails, if any.

Definition at line 658 of file AbstractDatabaseRecordList.php.

References AbstractDatabaseRecordList\$table.

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

Member Data Documentation

$allFields = 0

Definition at line 91 of file AbstractDatabaseRecordList.php.

$calcPerms = 0

Definition at line 196 of file AbstractDatabaseRecordList.php.

$clickTitleMode = ''

Definition at line 203 of file AbstractDatabaseRecordList.php.

$csvOutput = false

Definition at line 105 of file AbstractDatabaseRecordList.php.

$currentTable = []

Definition at line 301 of file AbstractDatabaseRecordList.php.

$displayFields

Definition at line 126 of file AbstractDatabaseRecordList.php.

$duplicateField

Definition at line 133 of file AbstractDatabaseRecordList.php.

Referenced by DatabaseRecordList\makeClip().

$duplicateStack = []

Definition at line 308 of file AbstractDatabaseRecordList.php.

$eCounter = 0

Definition at line 273 of file AbstractDatabaseRecordList.php.

$firstElementNumber = 0
$hideTables = ''

Definition at line 224 of file AbstractDatabaseRecordList.php.

$hideTranslations = ''

Definition at line 231 of file AbstractDatabaseRecordList.php.

$HTMLcode = ''

Definition at line 259 of file AbstractDatabaseRecordList.php.

$itemsLimitPerTable = 20

Definition at line 70 of file AbstractDatabaseRecordList.php.

$itemsLimitSingleTable = 100

Definition at line 77 of file AbstractDatabaseRecordList.php.

$JScode = ''

Definition at line 252 of file AbstractDatabaseRecordList.php.

$listOnlyInSingleTableMode = false

Definition at line 154 of file AbstractDatabaseRecordList.php.

$localizationView = false

Definition at line 98 of file AbstractDatabaseRecordList.php.

$modSharedTSconfig = []

Definition at line 210 of file AbstractDatabaseRecordList.php.

Referenced by PageLayoutView\languageSelector().

$modTSconfig

Definition at line 313 of file AbstractDatabaseRecordList.php.

$overridePageIdList = []
protected

Definition at line 326 of file AbstractDatabaseRecordList.php.

$overrideUrlParameters = []
protected

Definition at line 319 of file AbstractDatabaseRecordList.php.

$pageRecord = []

Definition at line 217 of file AbstractDatabaseRecordList.php.

$perms_clause = ''
$recPath_cache = []

Definition at line 287 of file AbstractDatabaseRecordList.php.

$returnUrl = ''
$script = 'index.php'

Definition at line 84 of file AbstractDatabaseRecordList.php.

$searchLevels = ''

Definition at line 175 of file AbstractDatabaseRecordList.php.

Referenced by ActionList\listURL().

$searchString = ''
$setFields = []

Definition at line 294 of file AbstractDatabaseRecordList.php.

Referenced by DatabaseRecordList\fieldSelectBox().

$sortRev

Definition at line 119 of file AbstractDatabaseRecordList.php.

Referenced by ActionList\listURL().

$tableDisplayOrder = []
protected

Definition at line 337 of file AbstractDatabaseRecordList.php.

$tableList = ''

Definition at line 49 of file AbstractDatabaseRecordList.php.

$tablesCollapsed = []

Definition at line 245 of file AbstractDatabaseRecordList.php.

Referenced by AbstractDatabaseRecordList\start().

$tableTSconfigOverTCA = []

Definition at line 238 of file AbstractDatabaseRecordList.php.

$thumbs = 0

Definition at line 63 of file AbstractDatabaseRecordList.php.

Referenced by ActionList\listURL().

$totalItems = ''