TYPO3  7.6
Public Member Functions | Public Attributes | Protected Member Functions | Static Protected Member Functions | Protected Attributes | List of all members
DatabaseRecordList Class Reference
Inheritance diagram for DatabaseRecordList:
AbstractDatabaseRecordList AbstractRecordList ElementBrowserRecordList DatabaseRecordList ActionList

Public Member Functions

 __construct ()
 
 getButtons ()
 
 getDocHeaderButtons (ModuleTemplate $moduleTemplate)
 
 renderListRow ($table, $row, $cc, $titleCol, $thumbsCol, $indent=0)
 
 renderListHeader ($table, $currentIdList)
 
 makeControl ($table, $row)
 
 makeClip ($table, $row)
 
 makeLocalizationPanel ($table, $row)
 
 fieldSelectBox ($table, $formFields=true)
 
 linkClipboardHeaderIcon ($string, $table, $cmd, $warning= '')
 
 clipNumPane ()
 
 addSortLink ($code, $field, $table)
 
 recPath ($pid)
 
 showNewRecLink ($table)
 
 makeReturnUrl ()
 
 setCsvRow ($csvRow)
 
 outputCSV ($prefix)
 
 addActionToCellGroup (&$cells, $action, $actionKey)
 
 setIsEditable ($isEditable)
 
 isEditable ($table)
 
- Public Member Functions inherited from AbstractDatabaseRecordList
 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

 $allowedNewTables = array()
 
 $deniedNewTables = array()
 
 $newWizards = false
 
 $dontShowClipControlPanels = false
 
 $showClipboard = false
 
 $noControlPanels = false
 
 $clickMenuEnabled = true
 
 $totalRowCount
 
 $spaceIcon
 
 $disableSingleTableView = false
 
 $pageRow = array()
 
 $csvOutput = false
 
 $clipObj
 
 $CBnames = array()
 
 $translations
 
 $selFieldList
 
 $pageinfo
 
 $MOD_MENU
 
- Public Attributes inherited from AbstractDatabaseRecordList
 $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

 isRowListingConditionFulfilled ($table, $row)
 
 getReferenceCount ($tableName, $uid)
 
 getPointerForPage ($page)
 
 renderListNavigation ($renderPart= 'top')
 
 createReferenceHtml ($tableName, $uid)
 
 initCSV ()
 
 addHeaderRowToCSV ()
 
 addToCSV (array $row=array())
 
 isRecordCurrentBackendUser ($table, $row)
 
 overlayEditLockPermissions ($table, $row=array(), $editPermission=true)
 
 editLockPermissions ()
 
 getDatabaseConnection ()
 
 getModule ()
 
 getDocumentTemplate ()
 
- Protected Member Functions inherited from AbstractDatabaseRecordList
 getSearchFields ($tableName)
 
 getBackendUserAuthentication ()
 
 getDatabaseConnection ()
 
- Protected Member Functions inherited from AbstractRecordList
 determineScriptUrl ()
 
 getThisScript ()
 
 getTranslateTools ()
 
 generateReferenceToolTip ($references, $launchViewParameter= '')
 
 getLanguageService ()
 
 getDatabaseConnection ()
 

Static Protected Member Functions

static removeControlFieldsFromFieldRow (array $row=array())
 

Protected Attributes

 $csvLines = array()
 
 $referenceCount = array()
 
 $editable = true
 
 $iconFactory
 
- Protected Attributes inherited from AbstractDatabaseRecordList
 $overrideUrlParameters = array()
 
 $tableDisplayOrder = []
 
- Protected Attributes inherited from AbstractRecordList
 $id = 0
 
 $iconFactory
 

Detailed Description

Class for rendering of Web>List module

Definition at line 36 of file recordlist/Classes/RecordList/DatabaseRecordList.php.

Constructor & Destructor Documentation

__construct ( )

Constructor

Definition at line 204 of file recordlist/Classes/RecordList/DatabaseRecordList.php.

References GeneralUtility\makeInstance().

Member Function Documentation

addActionToCellGroup ( $cells,
  $action,
  $actionKey 
)

add action into correct section

Parameters
array$cells
string$action
string$actionKey

Definition at line 2124 of file recordlist/Classes/RecordList/DatabaseRecordList.php.

addHeaderRowToCSV ( )
protected

Add header line with field names as CSV line

Returns
void

Definition at line 2044 of file recordlist/Classes/RecordList/DatabaseRecordList.php.

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

Definition at line 1959 of file recordlist/Classes/RecordList/DatabaseRecordList.php.

Referenced by DatabaseRecordList\renderListHeader().

addToCSV ( array  $row = array())
protected

Adds selected columns of one table row as CSV line.

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

Definition at line 2056 of file recordlist/Classes/RecordList/DatabaseRecordList.php.

Referenced by DatabaseRecordList\renderListRow().

clipNumPane ( )

Returns TRUE if a numeric clipboard pad is selected/active

Returns
bool

Definition at line 1944 of file recordlist/Classes/RecordList/DatabaseRecordList.php.

Referenced by DatabaseRecordList\renderListHeader().

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
int$uid
Returns
string HTML of reference a link, will be empty if there are no

Definition at line 1776 of file recordlist/Classes/RecordList/DatabaseRecordList.php.

Referenced by DatabaseRecordList\renderListRow().

editLockPermissions ( )
protected

Check whether or not the current backend user is an admin or the current page is locked by editlock.

Returns
bool

Definition at line 2201 of file recordlist/Classes/RecordList/DatabaseRecordList.php.

Referenced by DatabaseRecordList\getButtons(), and DatabaseRecordList\getDocHeaderButtons().

fieldSelectBox (   $table,
  $formFields = true 
)

Creates a checkbox list for selecting fields to display from a table:

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

Definition at line 1852 of file recordlist/Classes/RecordList/DatabaseRecordList.php.

getButtons ( )
getDatabaseConnection ( )
protected
Returns
DatabaseConnection

Definition at line 2209 of file recordlist/Classes/RecordList/DatabaseRecordList.php.

Referenced by DatabaseRecordList\getReferenceCount().

getDocHeaderButtons ( ModuleTemplate  $moduleTemplate)
getDocumentTemplate ( )
protected
Returns
DocumentTemplate

Definition at line 2225 of file recordlist/Classes/RecordList/DatabaseRecordList.php.

Referenced by DatabaseRecordList\getButtons().

getModule ( )
protected
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 1251 of file recordlist/Classes/RecordList/DatabaseRecordList.php.

getReferenceCount (   $tableName,
  $uid 
)
protected

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

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

Definition at line 1004 of file recordlist/Classes/RecordList/DatabaseRecordList.php.

References DatabaseRecordList\getDatabaseConnection(), and DatabaseRecordList\getReferenceCount().

Referenced by DatabaseRecordList\getReferenceCount().

initCSV ( )
protected

Initializes internal csvLines array with the header of field names

Returns
void

Definition at line 2034 of file recordlist/Classes/RecordList/DatabaseRecordList.php.

isEditable (   $table)

Check if the table is readonly or editable

Parameters
string$table
Returns
bool

Definition at line 2164 of file recordlist/Classes/RecordList/DatabaseRecordList.php.

Referenced by DatabaseRecordList\renderListHeader().

isRecordCurrentBackendUser (   $table,
  $row 
)
protected

Check if the record represents the current backend user

Parameters
string$table
array$row
Returns
bool

Definition at line 2146 of file recordlist/Classes/RecordList/DatabaseRecordList.php.

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
string[]$row Record
Returns
bool True, if all conditions are fulfilled.

Definition at line 844 of file recordlist/Classes/RecordList/DatabaseRecordList.php.

References DatabaseRecordList\isRowListingConditionFulfilled().

Referenced by DatabaseRecordList\isRowListingConditionFulfilled().

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.

Definition at line 1929 of file recordlist/Classes/RecordList/DatabaseRecordList.php.

Referenced by DatabaseRecordList\renderListHeader().

makeClip (   $table,
  $row 
)

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

Parameters
string$tableThe table
mixed[]$row The record for which to make the clipboard panel.
Exceptions
\UnexpectedValueException
Returns
string HTML table with the clipboard panel (unless disabled)

makeClip: Allows to change clip-icons of records in list-module 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 depending on the order of those array entries.

Definition at line 1665 of file recordlist/Classes/RecordList/DatabaseRecordList.php.

References $GLOBALS, and elseif.

Referenced by DatabaseRecordList\renderListRow().

makeControl (   $table,
  $row 
)

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

Parameters
string$tableThe table
mixed[]$row The record for which to make the control panel.
Exceptions
\UnexpectedValueException
Returns
string HTML table with the control panel (unless disabled)

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

makeControl: Allows to change control icons of records in list-module 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 depending on the order of those array entries.

Definition at line 1371 of file recordlist/Classes/RecordList/DatabaseRecordList.php.

References $GLOBALS.

Referenced by DatabaseRecordList\renderListRow().

makeLocalizationPanel (   $table,
  $row 
)

Creates the localization panel

Parameters
string$tableThe table
mixed[]$row The record for which to make the localization panel.
Returns
string[] Array with key 0/1 with content for column 1 and 2

Definition at line 1795 of file recordlist/Classes/RecordList/DatabaseRecordList.php.

Referenced by DatabaseRecordList\renderListRow().

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

Definition at line 2019 of file recordlist/Classes/RecordList/DatabaseRecordList.php.

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 execution!

Definition at line 2101 of file recordlist/Classes/RecordList/DatabaseRecordList.php.

overlayEditLockPermissions (   $table,
  $row = array(),
  $editPermission = true 
)
protected

Check if the current record is locked by editlock. Pages are locked if their editlock flag is set, records are if they are locked themselves or if the page they are on is locked (a page’s editlock is transitive for its content elements).

Parameters
string$table
array$row
bool$editPermission
Returns
bool

Definition at line 2179 of file recordlist/Classes/RecordList/DatabaseRecordList.php.

Referenced by DatabaseRecordList\renderListHeader().

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
int$pidThe page id for which to get the path
Returns
mixed[] The path.

Definition at line 1987 of file recordlist/Classes/RecordList/DatabaseRecordList.php.

Referenced by DatabaseRecordList\renderListRow().

static removeControlFieldsFromFieldRow ( array  $row = array())
staticprotected

Remove control fields from row for CSV export

Parameters
mixed[]$row fieldNames => fieldValues
Returns
mixed[] Input array reduces by control fields

Definition at line 2069 of file recordlist/Classes/RecordList/DatabaseRecordList.php.

renderListHeader (   $table,
  $currentIdList 
)

Rendering the header row for a table

Parameters
string$tableTable name
int[]$currentIdList Array of the currently displayed uids of the table
Exceptions
\UnexpectedValueException
Returns
string Header table row private
See Also
getTable()

renderListHeaderActions: Allows to change the clipboard icons of the Web>List table headers 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 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 1026 of file recordlist/Classes/RecordList/DatabaseRecordList.php.

References $GLOBALS, RecordList\$id, $lang, RecordList\$table, DatabaseRecordList\addSortLink(), DatabaseRecordList\clipNumPane(), BackendUtility\editOnClick(), elseif, GeneralUtility\getIndpEnv(), BackendUtility\getItemLabel(), RecordList\getLanguageService(), BackendUtility\getModTSconfig(), DatabaseRecordList\getModule(), DatabaseRecordList\isEditable(), DatabaseRecordList\linkClipboardHeaderIcon(), AbstractDatabaseRecordList\listURL(), DatabaseRecordList\overlayEditLockPermissions(), GeneralUtility\quoteJSvalue(), DatabaseRecordList\renderListHeader(), DatabaseRecordList\showNewRecLink(), and Icon\SIZE_SMALL.

Referenced by DatabaseRecordList\renderListHeader().

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 1262 of file recordlist/Classes/RecordList/DatabaseRecordList.php.

renderListRow (   $table,
  $row,
  $cc,
  $titleCol,
  $thumbsCol,
  $indent = 0 
)

Rendering a single row for the list

Parameters
string$tableTable name
mixed[]$row Current record
int$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
int$indentIndent from left.
Returns
string Table row for the element private
See Also
getTable()

Definition at line 862 of file recordlist/Classes/RecordList/DatabaseRecordList.php.

References $GLOBALS, RecordList\$id, RecordList\$table, AbstractRecordList\addElement(), DatabaseRecordList\addToCSV(), DatabaseRecordList\createReferenceHtml(), elseif, DatabaseRecordList\getModule(), BackendUtility\getProcessedValueExtra(), BackendUtility\getRecordTitle(), BackendUtility\getRecordToolTip(), BackendUtility\isRecordLocked(), AbstractDatabaseRecordList\linkUrlMail(), AbstractDatabaseRecordList\linkWrapItems(), DatabaseRecordList\makeClip(), DatabaseRecordList\makeControl(), DatabaseRecordList\makeLocalizationPanel(), GeneralUtility\quoteJSvalue(), DatabaseRecordList\recPath(), DatabaseRecordList\renderListRow(), Icon\SIZE_SMALL, AbstractDatabaseRecordList\thumbCode(), and BackendUtility\wrapClickMenuOnIcon().

Referenced by DatabaseRecordList\renderListRow().

setCsvRow (   $csvRow)

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

Parameters
mixed[]$csvRow Array with values to be listed.
Returns
void

Definition at line 2089 of file recordlist/Classes/RecordList/DatabaseRecordList.php.

setIsEditable (   $isEditable)
Parameters
bool$isEditable

Definition at line 2154 of file recordlist/Classes/RecordList/DatabaseRecordList.php.

showNewRecLink (   $table)

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

Parameters
string$tableTable name
Returns
bool Returns TRUE if a link for creating new records should be displayed for $table
See Also
::showNewRecLink

Definition at line 2002 of file recordlist/Classes/RecordList/DatabaseRecordList.php.

Referenced by DatabaseRecordList\renderListHeader().

Member Data Documentation

$allowedNewTables = array()
$CBnames = array()
$clickMenuEnabled = true
$clipObj
$csvLines = array()
protected
$csvOutput = false
$deniedNewTables = array()
$disableSingleTableView = false
$dontShowClipControlPanels = false
$editable = true
protected
$iconFactory
protected
$MOD_MENU
$newWizards = false
$noControlPanels = false
$pageinfo
$pageRow = array()
$referenceCount = array()
protected
$selFieldList
$showClipboard = false
$spaceIcon
$totalRowCount
$translations