‪TYPO3CMS  ‪main
TYPO3\CMS\Backend\Form\Wizard\SuggestWizardDefaultReceiver Class Reference

Public Member Functions

 __construct ($table, $config)
array queryTable (&$params, $recursionCounter=0)
 getBackendUser ()

Protected Member Functions

 prepareSelectStatement ()
string TYPO3 CMS Core Database Query Expression CompositeExpression buildConstraintBlock (string $searchString)
 splitSearchString (string $searchString)
array getAvailablePageIds (array $entryPointPageIds, int $depth=0)
 prepareOrderByStatement (QueryBuilder $queryBuilder)
 manipulateRecord (&$row)
bool checkRecordAccess ($row, $uid)
 makeWorkspaceOverlay (&$row)
string getRecordPath (&$row, $uid)
string getLabel ($row)
array renderRecord ($row, $entry)
 getLanguageService ()
QueryBuilder getQueryBuilderForTable ($table)

Protected Attributes

string $table = ''
string $mmForeignTable = ''
array $config = array( )
array $allowedPages = array( )
int $maxItems = 10
array $params = array( )
IconFactory $iconFactory
QueryBuilder $queryBuilder

Detailed Description

Default implementation of a handler class for an ajax record selector.

Normally other implementations should be inherited from this one. queryTable() should not be overwritten under normal circumstances.

Definition at line 39 of file SuggestWizardDefaultReceiver.php.

Constructor & Destructor Documentation

◆ __construct()

Member Function Documentation

◆ buildConstraintBlock()

string TYPO3 CMS Core Database Query Expression CompositeExpression TYPO3\CMS\Backend\Form\Wizard\SuggestWizardDefaultReceiver::buildConstraintBlock ( string  $searchString)

◆ checkRecordAccess()

bool TYPO3\CMS\Backend\Form\Wizard\SuggestWizardDefaultReceiver::checkRecordAccess (   $row,

◆ getAvailablePageIds()

array TYPO3\CMS\Backend\Form\Wizard\SuggestWizardDefaultReceiver::getAvailablePageIds ( array  $entryPointPageIds,
int  $depth = 0 

Get array of page ids from given page id and depth

array$entryPointPageIds‪List of possible page IDs.
int$depth‪Depth to go down.
‪array of all page ids

Definition at line 271 of file SuggestWizardDefaultReceiver.php.

Referenced by TYPO3\CMS\Backend\Form\Wizard\SuggestWizardDefaultReceiver\__construct().

◆ getBackendUser()

◆ getLabel()

string TYPO3\CMS\Backend\Form\Wizard\SuggestWizardDefaultReceiver::getLabel (   $row)

Returns a label for a given record; usually only a wrapper for \TYPO3\CMS\Backend\Utility\BackendUtility::getRecordTitle

array$row‪The record to get the label for
‪string The label

Definition at line 378 of file SuggestWizardDefaultReceiver.php.

Referenced by TYPO3\CMS\Backend\Form\Wizard\SuggestWizardDefaultReceiver\queryTable().

◆ getLanguageService()

TYPO3\CMS\Backend\Form\Wizard\SuggestWizardDefaultReceiver::getLanguageService ( )

Definition at line 407 of file SuggestWizardDefaultReceiver.php.

References $GLOBALS.

◆ getQueryBuilderForTable()

QueryBuilder TYPO3\CMS\Backend\Form\Wizard\SuggestWizardDefaultReceiver::getQueryBuilderForTable (   $table)

◆ getRecordPath()

string TYPO3\CMS\Backend\Form\Wizard\SuggestWizardDefaultReceiver::getRecordPath ( $row,

Returns the path for a record. Is the whole path for all records except pages - for these the last part is cut off, because it contains the pagetitle itself, which would be double information

The path is returned uncut, cutting has to be done by calling function.

array$row‪The row
int$uid‪UID of the record
‪string The record-path

Definition at line 358 of file SuggestWizardDefaultReceiver.php.

References TYPO3\CMS\Webhooks\Message\$uid.

Referenced by TYPO3\CMS\Backend\Form\Wizard\SuggestWizardDefaultReceiver\queryTable().

◆ makeWorkspaceOverlay()

TYPO3\CMS\Backend\Form\Wizard\SuggestWizardDefaultReceiver::makeWorkspaceOverlay ( $row)

Overlay the given record with its workspace-version, if any

array$row‪The record to get the workspace version for

Definition at line 340 of file SuggestWizardDefaultReceiver.php.

References TYPO3\CMS\Backend\Form\Wizard\SuggestWizardDefaultReceiver\getBackendUser().

Referenced by TYPO3\CMS\Backend\Form\Wizard\SuggestWizardDefaultReceiver\queryTable().

◆ manipulateRecord()

TYPO3\CMS\Backend\Form\Wizard\SuggestWizardDefaultReceiver::manipulateRecord ( $row)

Manipulate a record before using it to render the selector; may be used to replace a MM-relation etc.


Definition at line 307 of file SuggestWizardDefaultReceiver.php.

Referenced by TYPO3\CMS\Backend\Form\Wizard\SuggestWizardDefaultReceiver\queryTable().

◆ prepareOrderByStatement()

TYPO3\CMS\Backend\Form\Wizard\SuggestWizardDefaultReceiver::prepareOrderByStatement ( QueryBuilder  $queryBuilder)

Prepares the clause by which the result elements are sorted. See description of ORDER BY in SQL standard for reference.

Definition at line 289 of file SuggestWizardDefaultReceiver.php.

References $GLOBALS, TYPO3\CMS\Backend\Form\Wizard\SuggestWizardDefaultReceiver\$queryBuilder, and TYPO3\CMS\Core\Database\Query\QueryHelper\parseOrderBy().

Referenced by TYPO3\CMS\Backend\Form\Wizard\SuggestWizardDefaultReceiver\queryTable().

◆ prepareSelectStatement()

TYPO3\CMS\Backend\Form\Wizard\SuggestWizardDefaultReceiver::prepareSelectStatement ( )

Prepare the statement for selecting the records which will be returned to the selector. May also return some other records (e.g. from a mm-table) which will be used later on to select the real records

Definition at line 201 of file SuggestWizardDefaultReceiver.php.

References TYPO3\CMS\Backend\Form\Wizard\SuggestWizardDefaultReceiver\buildConstraintBlock(), TYPO3\CMS\Backend\Form\Wizard\SuggestWizardDefaultReceiver\splitSearchString(), and TYPO3\CMS\Core\Database\Query\QueryHelper\stripLogicalOperatorPrefix().

Referenced by TYPO3\CMS\Backend\Form\Wizard\SuggestWizardDefaultReceiver\queryTable().

◆ queryTable()

array TYPO3\CMS\Backend\Form\Wizard\SuggestWizardDefaultReceiver::queryTable ( $params,
  $recursionCounter = 0 

◆ renderRecord()

array TYPO3\CMS\Backend\Form\Wizard\SuggestWizardDefaultReceiver::renderRecord (   $row,

Calls a user function for rendering the page.

This user function should manipulate $entry

array$row‪The row
array$entry‪The entry to render
‪array The rendered entry (will be put into a later on

Definition at line 392 of file SuggestWizardDefaultReceiver.php.

References TYPO3\CMS\Backend\Form\Wizard\SuggestWizardDefaultReceiver\$params, and TYPO3\CMS\Backend\Form\Wizard\SuggestWizardDefaultReceiver\$table.

Referenced by TYPO3\CMS\Backend\Form\Wizard\SuggestWizardDefaultReceiver\queryTable().

◆ splitSearchString()

TYPO3\CMS\Backend\Form\Wizard\SuggestWizardDefaultReceiver::splitSearchString ( string  $searchString)

Splits the search string by space This allows searching for 'elements basic' and will find results like "elements rte basic" To search for whole phrases enclose by double-quotes: '"elements basic"', results in empty result

Definition at line 259 of file SuggestWizardDefaultReceiver.php.

Referenced by TYPO3\CMS\Backend\Form\Wizard\SuggestWizardDefaultReceiver\prepareSelectStatement().

Member Data Documentation

◆ $allowedPages

array TYPO3\CMS\Backend\Form\Wizard\SuggestWizardDefaultReceiver::$allowedPages = array( )

The list of pages that are allowed to perform the search for records on

Array of PIDs

Definition at line 64 of file SuggestWizardDefaultReceiver.php.

◆ $config

array TYPO3\CMS\Backend\Form\Wizard\SuggestWizardDefaultReceiver::$config = array( )

Configuration for this selector from TSconfig

Definition at line 58 of file SuggestWizardDefaultReceiver.php.

Referenced by TYPO3\CMS\Backend\Form\Wizard\SuggestWizardDefaultReceiver\__construct().

◆ $iconFactory

IconFactory TYPO3\CMS\Backend\Form\Wizard\SuggestWizardDefaultReceiver::$iconFactory

Definition at line 78 of file SuggestWizardDefaultReceiver.php.

◆ $maxItems

int TYPO3\CMS\Backend\Form\Wizard\SuggestWizardDefaultReceiver::$maxItems = 10

The maximum number of items to select.

Definition at line 70 of file SuggestWizardDefaultReceiver.php.

◆ $mmForeignTable

string TYPO3\CMS\Backend\Form\Wizard\SuggestWizardDefaultReceiver::$mmForeignTable = ''

The name of the foreign table to query (records from this table will be used for displaying instead of the ones from $table)

Definition at line 52 of file SuggestWizardDefaultReceiver.php.

◆ $params

array TYPO3\CMS\Backend\Form\Wizard\SuggestWizardDefaultReceiver::$params = array( )

◆ $queryBuilder

QueryBuilder TYPO3\CMS\Backend\Form\Wizard\SuggestWizardDefaultReceiver::$queryBuilder

◆ $table