TYPO3 CMS  TYPO3_6-2
TYPO3\CMS\Recordlist\RecordList\DatabaseRecordList Class Reference
Inheritance diagram for TYPO3\CMS\Recordlist\RecordList\DatabaseRecordList:
TYPO3\CMS\Recordlist\RecordList\AbstractDatabaseRecordList TYPO3\CMS\Backend\RecordList\AbstractRecordList localRecordList TYPO3\CMS\Backend\RecordList\ElementBrowserRecordList TYPO3\CMS\Dbal\RecordList\DatabaseRecordList TYPO3\CMS\SysAction\ActionList TBE_browser_recordList ux_localRecordList tx_sysaction_list

Public Member Functions

 getButtons ()
 
 renderListRow ($table, $row, $cc, $titleCol, $thumbsCol, $indent=0)
 
 renderListHeader ($table, $currentIdList)
 
 makeControl ($table, $row)
 
 makeClip ($table, $row)
 
 makeLocalizationPanel ($table, $row)
 
 fieldSelectBox ($table, $formFields=1)
 
 linkClipboardHeaderIcon ($string, $table, $cmd, $warning='')
 
 clipNumPane ()
 
 addSortLink ($code, $field, $table)
 
 recPath ($pid)
 
 showNewRecLink ($table)
 
 makeReturnUrl ()
 
 setCsvRow ($csvRow)
 
 outputCSV ($prefix)
 
- Public Member Functions inherited from TYPO3\CMS\Recordlist\RecordList\AbstractDatabaseRecordList
 start ($id, $table, $pointer, $search='', $levels='', $showLimit=0)
 
 generateList ()
 
 getSearchBox ($formFields=1)
 
 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=0, $addDateFields=0)
 
 getTreeObject ($id, $depth, $perms_clause)
 
 localizationRedirect ($justLocalized)
 
 setOverrideUrlParameters (array $urlParameters)
 
- Public Member Functions inherited from TYPO3\CMS\Backend\RecordList\AbstractRecordList
 __construct ()
 
 addElement ($h, $icon, $data, $trParams='', $lMargin='', $altLine='')
 
 writeTop ()
 
 writeBottom ()
 
 fwd_rwd_nav ($table='')
 
 fwd_rwd_HTML ($type, $pointer, $table='')
 
 listURL ($altId='')
 
 CBfunctions ()
 
 initializeLanguages ()
 
 languageFlag ($sys_language_uid, $addAsAdditionalText=TRUE)
 

Public Attributes

 $alternateBgColors = FALSE
 
 $allowedNewTables = array()
 
 $deniedNewTables = array()
 
 $newWizards = FALSE
 
 $dontShowClipControlPanels = FALSE
 
 $showClipboard = FALSE
 
 $noControlPanels = FALSE
 
 $clickMenuEnabled = TRUE
 
 $totalRowCount
 
 $spaceIcon
 
 $pageRow = array()
 
 $csvOutput = FALSE
 
 $clipObj
 
 $CBnames = array()
 
 $duplicateStack = array()
 
 $translations
 
 $selFieldList
 
 $disableSingleTableView = FALSE
 
- Public Attributes inherited from TYPO3\CMS\Recordlist\RecordList\AbstractDatabaseRecordList
 $tableList = ''
 
 $returnUrl = ''
 
 $thumbs = 0
 
 $itemsLimitPerTable = 20
 
 $itemsLimitSingleTable = 100
 
 $widthGif = '<img src="clear.gif" width="1" height="4" hspace="160" alt="" />'
 
 $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 TYPO3\CMS\Backend\RecordList\AbstractRecordList
 $iLimit = 10
 
 $leftMargin = 0
 
 $showIcon = 1
 
 $no_noWrap = 0
 
 $oddColumnsCssClass = ''
 
 $backPath = ''
 
 $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

 isRowListingConditionFulfilled ($table, $row)
 
 getReferenceCount ($tableName, $uid)
 
 getPointerForPage ($page)
 
 renderListNavigation ($renderPart='top')
 
 createReferenceHtml ($tableName, $uid)
 
 initCSV ()
 
 addHeaderRowToCSV ()
 
 addToCSV (array $row=array())
 
- Protected Member Functions inherited from TYPO3\CMS\Recordlist\RecordList\AbstractDatabaseRecordList
 getSearchFields ($tableName)
 
- Protected Member Functions inherited from TYPO3\CMS\Backend\RecordList\AbstractRecordList
 determineScriptUrl ()
 
 getThisScript ()
 
 getTranslateTools ()
 
 generateReferenceToolTip (array $references, $launchViewParameter='')
 

Static Protected Member Functions

static removeControlFieldsFromFieldRow (array $row=array())
 

Protected Attributes

 $csvLines = array()
 
 $referenceCount = array()
 
- Protected Attributes inherited from TYPO3\CMS\Recordlist\RecordList\AbstractDatabaseRecordList
 $overrideUrlParameters = array()
 

Detailed Description

Class for rendering of Web>List module

Author
Kasper Skårhøj kaspe.nosp@m.rYYY.nosp@m.Y@typ.nosp@m.o3.c.nosp@m.om

Definition at line 27 of file DatabaseRecordList.php.

Member Function Documentation

◆ addHeaderRowToCSV()

TYPO3\CMS\Recordlist\RecordList\DatabaseRecordList::addHeaderRowToCSV ( )
protected

Add header line with field names as CSV line

Returns
void

Definition at line 1519 of file DatabaseRecordList.php.

◆ addSortLink()

TYPO3\CMS\Recordlist\RecordList\DatabaseRecordList::addSortLink (   $code,
  $field,
  $table 
)

Creates a sort-by link on the input string ($code). It will automatically detect if sorting should be ascending or descending depending on $this->sortRev. Also some fields will not be possible to sort (including if single-table-view is disabled).

Parameters
string$codeThe string to link (text)
string$fieldThe fieldname represented by the title ($code)
string$tableTable name
Returns
string Linked $code variable
Todo:
Define visibility

Definition at line 1439 of file DatabaseRecordList.php.

◆ addToCSV()

TYPO3\CMS\Recordlist\RecordList\DatabaseRecordList::addToCSV ( array  $row = array())
protected

Adds selected columns of one table row as CSV line.

Parameters
array$rowRecord array, from which the values of fields found in $this->fieldArray will be listed in the CSV output.
Returns
void

Definition at line 1530 of file DatabaseRecordList.php.

◆ clipNumPane()

TYPO3\CMS\Recordlist\RecordList\DatabaseRecordList::clipNumPane ( )

Returns TRUE if a numeric clipboard pad is selected/active

Returns
boolean
Todo:
Define visibility

Definition at line 1424 of file DatabaseRecordList.php.

◆ createReferenceHtml()

TYPO3\CMS\Recordlist\RecordList\DatabaseRecordList::createReferenceHtml (   $tableName,
  $uid 
)
protected

Creates the HTML for a reference count for the record with the UID $uid in the table $tableName.

Parameters
string$tableName
integer$uid
Returns
string HTML of reference a link, will be empty if there are no

Definition at line 1285 of file DatabaseRecordList.php.

◆ fieldSelectBox()

TYPO3\CMS\Recordlist\RecordList\DatabaseRecordList::fieldSelectBox (   $table,
  $formFields = 1 
)

Create the selector box for selecting fields to display from a table:

Parameters
string$tableTable name
boolean$formFieldsIf TRUE, form-fields will be wrapped around the table.
Returns
string HTML table with the selector box (name: displayFields['.$table.'][])
Todo:
Define visibility

Definition at line 1348 of file DatabaseRecordList.php.

◆ getButtons()

TYPO3\CMS\Recordlist\RecordList\DatabaseRecordList::getButtons ( )

Create the panel of buttons for submitting the form or otherwise perform operations.

Returns
array All available buttons as an assoc. array

Definition at line 152 of file DatabaseRecordList.php.

References $GLOBALS, TYPO3\CMS\Backend\Utility\BackendUtility\BEgetRootLine(), TYPO3\CMS\Backend\Utility\BackendUtility\cshItem(), TYPO3\CMS\Core\Utility\GeneralUtility\trimExplode(), and TYPO3\CMS\Backend\Utility\BackendUtility\viewOnClick().

◆ getPointerForPage()

TYPO3\CMS\Recordlist\RecordList\DatabaseRecordList::getPointerForPage (   $page)
protected

Get pointer for first element on the page

Parameters
int$pagePage number starting with 1
Returns
int Pointer to first element on the page (starting with 0)

Definition at line 900 of file DatabaseRecordList.php.

◆ getReferenceCount()

TYPO3\CMS\Recordlist\RecordList\DatabaseRecordList::getReferenceCount (   $tableName,
  $uid 
)
protected

Gets the number of records referencing the record with the UID $uid in the table $tableName.

Parameters
string$tableName
integer$uid
Returns
integer The number of references to record $uid in table

Definition at line 718 of file DatabaseRecordList.php.

◆ initCSV()

TYPO3\CMS\Recordlist\RecordList\DatabaseRecordList::initCSV ( )
protected

Initializes internal csvLines array with the header of field names

Returns
void

Definition at line 1510 of file DatabaseRecordList.php.

◆ isRowListingConditionFulfilled()

TYPO3\CMS\Recordlist\RecordList\DatabaseRecordList::isRowListingConditionFulfilled (   $table,
  $row 
)
protected

Check if all row listing conditions are fulfilled.

This function serves as a dummy method to be overriden in extending classes.

Parameters
string$tableTable name
array$rowRecord
Returns
boolean True, if all conditions are fulfilled.

Definition at line 575 of file DatabaseRecordList.php.

◆ linkClipboardHeaderIcon()

TYPO3\CMS\Recordlist\RecordList\DatabaseRecordList::linkClipboardHeaderIcon (   $string,
  $table,
  $cmd,
  $warning = '' 
)

Creates a link around $string. The link contains an onclick action which submits the script with some clipboard action. Currently, this is used for setting elements / delete elements.

Parameters
string$stringThe HTML content to link (image/text)
string$tableTable name
string$cmdClipboard command (eg. "setCB" or "delete")
string$warningWarning text, if any ("delete" uses this for confirmation)
Returns
string tag wrapped link.
Todo:
Define visibility

Definition at line 1410 of file DatabaseRecordList.php.

◆ makeClip()

TYPO3\CMS\Recordlist\RecordList\DatabaseRecordList::makeClip (   $table,
  $row 
)

Creates the clipboard panel for a single record in the listing.

Parameters
string$tableThe table
array$rowThe record for which to make the clipboard panel.
Returns
string HTML table with the clipboard panel (unless disabled)
Todo:
Define visibility

makeClip: Allows to change clip-icons of records in list-module

Date
2007-11-20 Bernhard Kraft krafb.nosp@m.t@kr.nosp@m.aftb..nosp@m.at This hook method gets passed the current $cells array as third parameter. This array contains values for the clipboard icons generated for each record in Web>List. Each array entry is accessible by an index-key. The order of the icons is dependend on the order of those array entries.

Definition at line 1211 of file DatabaseRecordList.php.

◆ makeControl()

TYPO3\CMS\Recordlist\RecordList\DatabaseRecordList::makeControl (   $table,
  $row 
)

Creates the control panel for a single record in the listing.

Parameters
string$tableThe table
array$rowThe record for which to make the control panel.
Returns
string HTML table with the control panel (unless disabled)
Todo:
Define visibility

recStatInfoHooks: Allows to insert HTML before record icons on various places

Date
2007-09-22 Kasper Skårhøj kaspe.nosp@m.r200.nosp@m.7@typ.nosp@m.o3.c.nosp@m.om

makeControl: Allows to change control icons of records in list-module

Date
2007-11-20 Bernhard Kraft krafb.nosp@m.t@kr.nosp@m.aftb..nosp@m.at This hook method gets passed the current $cells array as third parameter. This array contains values for the icons/actions generated for each record in Web>List. Each array entry is accessible by an index-key. The order of the icons is dependend on the order of those array entries.

Definition at line 997 of file DatabaseRecordList.php.

References $GLOBALS, TYPO3\CMS\Recordlist\RecordList\DatabaseRecordList\$spaceIcon, TYPO3\CMS\Recordlist\RecordList\AbstractDatabaseRecordList\$table, TYPO3\CMS\Backend\Utility\BackendUtility\editOnClick(), TYPO3\CMS\Backend\Utility\BackendUtility\getModuleUrl(), TYPO3\CMS\Backend\Utility\BackendUtility\selectVersionsOfRecord(), TYPO3\CMS\Recordlist\RecordList\DatabaseRecordList\showNewRecLink(), and TYPO3\CMS\Backend\Utility\BackendUtility\viewOnClick().

◆ makeLocalizationPanel()

TYPO3\CMS\Recordlist\RecordList\DatabaseRecordList::makeLocalizationPanel (   $table,
  $row 
)

Creates the localization panel

Parameters
string$tableThe table
array$rowThe record for which to make the localization panel.
Returns
array Array with key 0/1 with content for column 1 and 2
Todo:
Define visibility

Definition at line 1303 of file DatabaseRecordList.php.

◆ makeReturnUrl()

TYPO3\CMS\Recordlist\RecordList\DatabaseRecordList::makeReturnUrl ( )

Creates the "&returnUrl" parameter for links - this is used when the script links to other scripts and passes its own URL with the link so other scripts can return to the listing again. Uses REQUEST_URI as value.

Returns
string
Todo:
Define visibility

Definition at line 1496 of file DatabaseRecordList.php.

◆ outputCSV()

TYPO3\CMS\Recordlist\RecordList\DatabaseRecordList::outputCSV (   $prefix)

Compiles the internal csvLines array to a csv-string and outputs it to the browser. This function exits!

Parameters
string$prefixFilename prefix:
Returns
void EXITS php execusion!
Todo:
Define visibility

Definition at line 1576 of file DatabaseRecordList.php.

◆ recPath()

TYPO3\CMS\Recordlist\RecordList\DatabaseRecordList::recPath (   $pid)

Returns the path for a certain pid The result is cached internally for the session, thus you can call this function as much as you like without performance problems.

Parameters
integer$pidThe page id for which to get the path
Returns
string The path.
Todo:
Define visibility

Definition at line 1463 of file DatabaseRecordList.php.

◆ removeControlFieldsFromFieldRow()

static TYPO3\CMS\Recordlist\RecordList\DatabaseRecordList::removeControlFieldsFromFieldRow ( array  $row = array())
staticprotected

Remove control fields from row for CSV export

Parameters
array$rowfieldNames => fieldValues
Returns
array Input array reduces by control fields

Definition at line 1542 of file DatabaseRecordList.php.

◆ renderListHeader()

TYPO3\CMS\Recordlist\RecordList\DatabaseRecordList::renderListHeader (   $table,
  $currentIdList 
)

Rendering the header row for a table

Parameters
string$tableTable name
array$currentIdListArray of the currently displayed uids of the table
Returns
string Header table row private
See also
getTable()
Todo:
Define visibility

renderListHeaderActions: Allows to change the clipboard icons of the Web>List table headers

Date
2007-11-20 Bernhard Kraft krafb.nosp@m.t@kr.nosp@m.aftb..nosp@m.at Above each listed table in Web>List a header row is shown. This hook allows to modify the icons responsible for the clipboard functions (shown above the clipboard checkboxes when a clipboard other than "Normal" is selected), or other "Action" functions which perform operations on the listed records.

renderListHeader: Allows to change the contents of columns/cells of the Web>List table headers

Date
2007-11-20 Bernhard Kraft krafb.nosp@m.t@kr.nosp@m.aftb..nosp@m.at Above each listed table in Web>List a header row is shown. Containing the labels of all shown fields and additional icons to create new records for this table or perform special clipboard tasks like mark and copy all listed records to clipboard, etc.

Definition at line 736 of file DatabaseRecordList.php.

◆ renderListNavigation()

TYPO3\CMS\Recordlist\RecordList\DatabaseRecordList::renderListNavigation (   $renderPart = 'top')
protected

Creates a page browser for tables with many records

Parameters
string$renderPartDistinguish between 'top' and 'bottom' part of the navigation (above or below the records)
Returns
string Navigation HTML

Definition at line 910 of file DatabaseRecordList.php.

◆ renderListRow()

TYPO3\CMS\Recordlist\RecordList\DatabaseRecordList::renderListRow (   $table,
  $row,
  $cc,
  $titleCol,
  $thumbsCol,
  $indent = 0 
)

Rendering a single row for the list

Parameters
string$tableTable name
array$rowCurrent record
integer$ccCounter, counting for each time an element is rendered (used for alternating colors)
string$titleColTable field (column) where header value is found
string$thumbsColTable field (column) where (possible) thumbnails can be found
integer$indentIndent from left.
Returns
string Table row for the element private
See also
getTable()
Todo:
Define visibility

Definition at line 593 of file DatabaseRecordList.php.

◆ setCsvRow()

TYPO3\CMS\Recordlist\RecordList\DatabaseRecordList::setCsvRow (   $csvRow)

Adds input row of values to the internal csvLines array as a CSV formatted line

Parameters
array$csvRowArray with values to be listed.
Returns
void
Todo:
Define visibility

Definition at line 1564 of file DatabaseRecordList.php.

◆ showNewRecLink()

TYPO3\CMS\Recordlist\RecordList\DatabaseRecordList::showNewRecLink (   $table)

Returns TRUE if a link for creating new records should be displayed for $table

Parameters
string$tableTable name
Returns
boolean Returns TRUE if a link for creating new records should be displayed for $table
See also
SC_db_new::showNewRecLink
Todo:
Define visibility

Definition at line 1478 of file DatabaseRecordList.php.

Referenced by TYPO3\CMS\Recordlist\RecordList\DatabaseRecordList\makeControl().

Member Data Documentation

◆ $allowedNewTables

TYPO3\CMS\Recordlist\RecordList\DatabaseRecordList::$allowedNewTables = array()
Todo:
Define visibility

Definition at line 40 of file DatabaseRecordList.php.

◆ $alternateBgColors

TYPO3\CMS\Recordlist\RecordList\DatabaseRecordList::$alternateBgColors = FALSE
Todo:
Define visibility

Definition at line 34 of file DatabaseRecordList.php.

◆ $CBnames

TYPO3\CMS\Recordlist\RecordList\DatabaseRecordList::$CBnames = array()
Todo:
Define visibility

Definition at line 118 of file DatabaseRecordList.php.

◆ $clickMenuEnabled

TYPO3\CMS\Recordlist\RecordList\DatabaseRecordList::$clickMenuEnabled = TRUE
Todo:
Define visibility

Definition at line 76 of file DatabaseRecordList.php.

◆ $clipObj

TYPO3\CMS\Recordlist\RecordList\DatabaseRecordList::$clipObj

Definition at line 112 of file DatabaseRecordList.php.

◆ $csvLines

TYPO3\CMS\Recordlist\RecordList\DatabaseRecordList::$csvLines = array()
protected

Definition at line 98 of file DatabaseRecordList.php.

◆ $csvOutput

TYPO3\CMS\Recordlist\RecordList\DatabaseRecordList::$csvOutput = FALSE
Todo:
Define visibility

Definition at line 104 of file DatabaseRecordList.php.

◆ $deniedNewTables

TYPO3\CMS\Recordlist\RecordList\DatabaseRecordList::$deniedNewTables = array()
Todo:
Define visibility

Definition at line 46 of file DatabaseRecordList.php.

◆ $disableSingleTableView

TYPO3\CMS\Recordlist\RecordList\DatabaseRecordList::$disableSingleTableView = FALSE

Definition at line 145 of file DatabaseRecordList.php.

◆ $dontShowClipControlPanels

TYPO3\CMS\Recordlist\RecordList\DatabaseRecordList::$dontShowClipControlPanels = FALSE
Todo:
Define visibility

Definition at line 58 of file DatabaseRecordList.php.

◆ $duplicateStack

TYPO3\CMS\Recordlist\RecordList\DatabaseRecordList::$duplicateStack = array()
Todo:
Define visibility

Definition at line 124 of file DatabaseRecordList.php.

◆ $newWizards

TYPO3\CMS\Recordlist\RecordList\DatabaseRecordList::$newWizards = FALSE
Todo:
Define visibility

Definition at line 52 of file DatabaseRecordList.php.

◆ $noControlPanels

TYPO3\CMS\Recordlist\RecordList\DatabaseRecordList::$noControlPanels = FALSE
Todo:
Define visibility

Definition at line 70 of file DatabaseRecordList.php.

◆ $pageRow

TYPO3\CMS\Recordlist\RecordList\DatabaseRecordList::$pageRow = array()
Todo:
Define visibility

Definition at line 95 of file DatabaseRecordList.php.

◆ $referenceCount

TYPO3\CMS\Recordlist\RecordList\DatabaseRecordList::$referenceCount = array()
protected

Definition at line 131 of file DatabaseRecordList.php.

◆ $selFieldList

TYPO3\CMS\Recordlist\RecordList\DatabaseRecordList::$selFieldList
Todo:
Define visibility

Definition at line 143 of file DatabaseRecordList.php.

◆ $showClipboard

TYPO3\CMS\Recordlist\RecordList\DatabaseRecordList::$showClipboard = FALSE
Todo:
Define visibility

Definition at line 64 of file DatabaseRecordList.php.

◆ $spaceIcon

TYPO3\CMS\Recordlist\RecordList\DatabaseRecordList::$spaceIcon
Todo:
Define visibility

Definition at line 88 of file DatabaseRecordList.php.

Referenced by TYPO3\CMS\Recordlist\RecordList\DatabaseRecordList\makeControl().

◆ $totalRowCount

TYPO3\CMS\Recordlist\RecordList\DatabaseRecordList::$totalRowCount
Todo:
Define visibility

Definition at line 82 of file DatabaseRecordList.php.

◆ $translations

TYPO3\CMS\Recordlist\RecordList\DatabaseRecordList::$translations
Todo:
Define visibility

Definition at line 137 of file DatabaseRecordList.php.