‪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)
protected

◆ checkRecordAccess()

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

◆ getAvailablePageIds()

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

Get array of page ids from given page id and depth

Parameters
array$entryPointPageIds‪List of possible page IDs.
int$depth‪Depth to go down.
Returns
‪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)
protected

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

Parameters
array$row‪The record to get the label for
Returns
‪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 ( )
protected

Definition at line 407 of file SuggestWizardDefaultReceiver.php.

References $GLOBALS.

◆ getQueryBuilderForTable()

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

◆ getRecordPath()

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

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.

Parameters
array$row‪The row
int$uid‪UID of the record
Returns
‪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)
protected

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

Parameters
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)
protected

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

Parameters
array$row

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)
protected

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 ( )
protected

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,
  $entry 
)
protected

Calls a user function for rendering the page.

This user function should manipulate $entry

Parameters
array$row‪The row
array$entry‪The entry to render
Returns
‪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)
protected

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( )
protected

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( )
protected

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
protected

Definition at line 78 of file SuggestWizardDefaultReceiver.php.

◆ $maxItems

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

The maximum number of items to select.

Definition at line 70 of file SuggestWizardDefaultReceiver.php.

◆ $mmForeignTable

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

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( )
protected

◆ $queryBuilder

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

◆ $table