TYPO3  7.6
Public Member Functions | Public Attributes | Protected Member Functions | Protected Attributes | List of all members
AbstractDatabaseRecordList Class Reference
Inheritance diagram for AbstractDatabaseRecordList:
AbstractRecordList PageLayoutView DatabaseRecordList ElementBrowserRecordList DatabaseRecordList 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= '*')
 
 setTotalItems ($queryParts)
 
 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)
 
- 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= '')
 
 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
 
 $pidSelect = ''
 
 $perms_clause = ''
 
 $calcPerms = 0
 
 $clickTitleMode = ''
 
 $modSharedTSconfig = array()
 
 $pageRecord = array()
 
 $hideTables = ''
 
 $hideTranslations = ''
 
 $tableTSconfigOverTCA = array()
 
 $tablesCollapsed = array()
 
 $JScode = ''
 
 $HTMLcode = ''
 
 $iLimit = 0
 
 $eCounter = 0
 
 $totalItems = ''
 
 $recPath_cache = array()
 
 $setFields = array()
 
 $currentTable = array()
 
 $duplicateStack = array()
 
 $modTSconfig
 
- Public Attributes inherited from AbstractRecordList
 $iLimit = 10
 
 $leftMargin = 0
 
 $showIcon = 1
 
 $no_noWrap = 0
 
 $oddColumnsCssClass = ''
 
 $fieldArray = array()
 
 $addElement_tdParams = array()
 
 $addElement_tdCssClass = array()
 
 $fixedL = 30
 
 $thisScript = ''
 
 $setLMargin = 1
 
 $counter = 0
 
 $totalItems = ''
 
 $firstElementNumber = 0
 
 $eCounter = 0
 
 $HTMLcode = ''
 
 $pageOverlays = array()
 
 $languageIconTitles = array()
 
 $translateTools
 

Protected Member Functions

 getSearchFields ($tableName)
 
 getBackendUserAuthentication ()
 
 getDatabaseConnection ()
 
- Protected Member Functions inherited from AbstractRecordList
 determineScriptUrl ()
 
 getThisScript ()
 
 getTranslateTools ()
 
 generateReferenceToolTip ($references, $launchViewParameter= '')
 
 getLanguageService ()
 
 getDatabaseConnection ()
 

Protected Attributes

 $overrideUrlParameters = array()
 
 $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 36 of file AbstractDatabaseRecordList.php.

Member Function Documentation

generateList ( )
getBackendUserAuthentication ( )
protected
Returns
BackendUserAuthentication

Definition at line 1130 of file AbstractDatabaseRecordList.php.

getDatabaseConnection ( )
protected
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 780 of file AbstractDatabaseRecordList.php.

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

Referenced by AbstractDatabaseRecordList\getSearchFields(), and 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 528 of file AbstractDatabaseRecordList.php.

References AbstractDatabaseRecordList\getTable().

Referenced by AbstractDatabaseRecordList\generateList(), and AbstractDatabaseRecordList\getTable().

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 890 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 829 of file AbstractDatabaseRecordList.php.

References $lang, RecordList\$table, Permission\CONTENT_EDIT, BackendUtility\editOnClick(), GeneralUtility\fixed_lgd_cs(), RecordList\getBackendUserAuthentication(), RecordList\getLanguageService(), BackendUtility\getRecord(), BackendUtility\getRecordTitle(), AbstractDatabaseRecordList\linkWrapItems(), Permission\PAGE_EDIT, and BackendUtility\viewOnClick().

Referenced by AbstractDatabaseRecordList\linkWrapItems(), and 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 812 of file AbstractDatabaseRecordList.php.

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

Referenced by AbstractDatabaseRecordList\linkWrapTable().

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 915 of file AbstractDatabaseRecordList.php.

Referenced by DatabaseRecordList\getButtons(), DatabaseRecordList\getDocHeaderButtons(), AbstractDatabaseRecordList\linkWrapTable(), and DatabaseRecordList\renderListHeader().

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 1063 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 976 of file AbstractDatabaseRecordList.php.

Referenced by 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

Definition at line 636 of file AbstractDatabaseRecordList.php.

References $GLOBALS, RecordList\$id, RecordList\$table, BackendUtility\deleteClause(), AbstractDatabaseRecordList\getDatabaseConnection(), GeneralUtility\getUserObj(), AbstractDatabaseRecordList\makeFieldList(), AbstractDatabaseRecordList\makeQueryArray(), AbstractDatabaseRecordList\makeSearchString(), GeneralUtility\trimExplode(), and BackendUtility\versioningPlaceholderClause().

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

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 709 of file AbstractDatabaseRecordList.php.

References $GLOBALS, RecordList\$table, MathUtility\canBeInterpretedAsInteger(), elseif, AbstractDatabaseRecordList\getDatabaseConnection(), AbstractDatabaseRecordList\getSearchFields(), GeneralUtility\inList(), and AbstractDatabaseRecordList\makeSearchString().

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

requestUri ( )

Returns "requestUri" - which is basically listURL

Returns
string Content of ->listURL()

Definition at line 963 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 598 of file AbstractDatabaseRecordList.php.

References RecordList\getBackendUserAuthentication(), and AbstractDatabaseRecordList\setDispFields().

Referenced by AbstractDatabaseRecordList\setDispFields().

setOverrideUrlParameters ( array  $urlParameters)

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

Parameters
string[]$urlParameters
Returns
void

Definition at line 1089 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 1106 of file AbstractDatabaseRecordList.php.

setTotalItems (   $queryParts)

Based on input query array (query for selecting count(*) from a table) it will select the number of records and set the value in $this->totalItems

Parameters
string[]$queryParts Query array
Returns
void
See Also
makeQueryArray()

Definition at line 696 of file AbstractDatabaseRecordList.php.

References AbstractDatabaseRecordList\getDatabaseConnection(), and AbstractDatabaseRecordList\setTotalItems().

Referenced by PageLayoutView\makeOrdinaryList(), and AbstractDatabaseRecordList\setTotalItems().

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 346 of file AbstractDatabaseRecordList.php.

References $GLOBALS, RecordList\$id, RecordList\$pointer, RecordList\$returnUrl, AbstractDatabaseRecordList\$searchLevels, RecordList\$showLimit, RecordList\$table, GeneralUtility\_GP(), elseif, MathUtility\forceIntegerInRange(), RecordList\getBackendUserAuthentication(), AbstractDatabaseRecordList\getDatabaseConnection(), AbstractRecordList\initializeLanguages(), AbstractDatabaseRecordList\localizationRedirect(), GeneralUtility\sanitizeLocalUrl(), and AbstractDatabaseRecordList\start().

Referenced by AbstractDatabaseRecordList\start().

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 622 of file AbstractDatabaseRecordList.php.

References RecordList\$table, and AbstractDatabaseRecordList\thumbCode().

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

Member Data Documentation

$allFields = 0

Definition at line 86 of file AbstractDatabaseRecordList.php.

$calcPerms = 0

Definition at line 199 of file AbstractDatabaseRecordList.php.

$clickTitleMode = ''

Definition at line 206 of file AbstractDatabaseRecordList.php.

$csvOutput = false

Definition at line 100 of file AbstractDatabaseRecordList.php.

$currentTable = array()

Definition at line 304 of file AbstractDatabaseRecordList.php.

$displayFields

Definition at line 121 of file AbstractDatabaseRecordList.php.

$duplicateField

Definition at line 128 of file AbstractDatabaseRecordList.php.

$duplicateStack = array()

Definition at line 311 of file AbstractDatabaseRecordList.php.

$eCounter = 0

Definition at line 276 of file AbstractDatabaseRecordList.php.

$firstElementNumber = 0
$hideTables = ''

Definition at line 227 of file AbstractDatabaseRecordList.php.

$hideTranslations = ''

Definition at line 234 of file AbstractDatabaseRecordList.php.

$HTMLcode = ''

Definition at line 262 of file AbstractDatabaseRecordList.php.

$id
$iLimit = 0

Definition at line 269 of file AbstractDatabaseRecordList.php.

$itemsLimitPerTable = 20

Definition at line 65 of file AbstractDatabaseRecordList.php.

$itemsLimitSingleTable = 100

Definition at line 72 of file AbstractDatabaseRecordList.php.

$JScode = ''

Definition at line 255 of file AbstractDatabaseRecordList.php.

$listOnlyInSingleTableMode = false

Definition at line 149 of file AbstractDatabaseRecordList.php.

$localizationView = false

Definition at line 93 of file AbstractDatabaseRecordList.php.

$modSharedTSconfig = array()

Definition at line 213 of file AbstractDatabaseRecordList.php.

Referenced by PageLayoutView\languageSelector().

$modTSconfig

Definition at line 316 of file AbstractDatabaseRecordList.php.

$overrideUrlParameters = array()
protected

Definition at line 322 of file AbstractDatabaseRecordList.php.

$pageRecord = array()

Definition at line 220 of file AbstractDatabaseRecordList.php.

$perms_clause = ''

Definition at line 192 of file AbstractDatabaseRecordList.php.

$pidSelect = ''

Definition at line 185 of file AbstractDatabaseRecordList.php.

$recPath_cache = array()

Definition at line 290 of file AbstractDatabaseRecordList.php.

$returnUrl = ''

Definition at line 51 of file AbstractDatabaseRecordList.php.

Referenced by ActionList\listURL().

$script = 'index.php'

Definition at line 79 of file AbstractDatabaseRecordList.php.

$searchLevels = ''
$searchString = ''

Definition at line 163 of file AbstractDatabaseRecordList.php.

Referenced by ActionList\listURL().

$setFields = array()

Definition at line 297 of file AbstractDatabaseRecordList.php.

$showLimit = 0

Definition at line 177 of file AbstractDatabaseRecordList.php.

Referenced by ActionList\listURL().

$sortField

Definition at line 107 of file AbstractDatabaseRecordList.php.

Referenced by ActionList\listURL().

$sortRev

Definition at line 114 of file AbstractDatabaseRecordList.php.

Referenced by ActionList\listURL().

$table = ''
$tableDisplayOrder = []
protected

Definition at line 333 of file AbstractDatabaseRecordList.php.

$tableList = ''

Definition at line 44 of file AbstractDatabaseRecordList.php.

$tablesCollapsed = array()

Definition at line 248 of file AbstractDatabaseRecordList.php.

$tableTSconfigOverTCA = array()

Definition at line 241 of file AbstractDatabaseRecordList.php.

$thumbs = 0

Definition at line 58 of file AbstractDatabaseRecordList.php.

Referenced by ActionList\listURL().

$totalItems = ''

Definition at line 283 of file AbstractDatabaseRecordList.php.