‪TYPO3CMS  10.4
TYPO3\CMS\Recordlist\LinkHandler\RecordLinkHandler Class Reference
Inheritance diagram for TYPO3\CMS\Recordlist\LinkHandler\RecordLinkHandler:
TYPO3\CMS\Recordlist\LinkHandler\AbstractLinkHandler TYPO3\CMS\Recordlist\LinkHandler\LinkHandlerInterface TYPO3\CMS\Recordlist\Tree\View\LinkParameterProviderInterface

Public Member Functions

 initialize (AbstractLinkBrowserController $linkBrowser, $identifier, array $configuration)
 
bool canHandleLink (array $linkParts)
 
string formatCurrentUrl ()
 
string render (ServerRequestInterface $request)
 
string[] getBodyTagAttributes ()
 
string[] getUrlParameters (array $values)
 
bool isCurrentlySelectedItem (array $values)
 
string getScriptUrl ()
 

Protected Member Functions

string renderPageTree ()
 

Protected Attributes

string $identifier
 
array $configuration = array( )
 
array $linkParts = array( )
 
int $expandPage = 0
 

Detailed Description

Link handler for arbitrary database records

This class is a specific LinkHandler implementation and is not part of the TYPO3's Core API.

Definition at line 35 of file RecordLinkHandler.php.

Member Function Documentation

◆ canHandleLink()

bool TYPO3\CMS\Recordlist\LinkHandler\RecordLinkHandler::canHandleLink ( array  $linkParts)

Checks if this is the right handler for the given link.

Also stores information locally about currently linked record.

Parameters
array$linkParts‪Link parts as returned from TypoLinkCodecService
Returns
‪bool

Implements TYPO3\CMS\Recordlist\LinkHandler\LinkHandlerInterface.

Definition at line 81 of file RecordLinkHandler.php.

References $GLOBALS, TYPO3\CMS\Recordlist\LinkHandler\RecordLinkHandler\$linkParts, TYPO3\CMS\Recordlist\LinkHandler\AbstractLinkHandler\getLanguageService(), TYPO3\CMS\Core\Localization\LanguageService\getLL(), TYPO3\CMS\Backend\Utility\BackendUtility\getRecord(), TYPO3\CMS\Backend\Utility\BackendUtility\getRecordTitle(), and TYPO3\CMS\Core\Localization\LanguageService\sL().

◆ formatCurrentUrl()

string TYPO3\CMS\Recordlist\LinkHandler\RecordLinkHandler::formatCurrentUrl ( )

Formats information for the current record for HTML output.

Returns
‪string

Implements TYPO3\CMS\Recordlist\LinkHandler\LinkHandlerInterface.

Definition at line 110 of file RecordLinkHandler.php.

◆ getBodyTagAttributes()

string [] TYPO3\CMS\Recordlist\LinkHandler\RecordLinkHandler::getBodyTagAttributes ( )

Returns attributes for the body tag.

Returns
‪string[] Array of body-tag attributes

Implements TYPO3\CMS\Recordlist\LinkHandler\LinkHandlerInterface.

Definition at line 191 of file RecordLinkHandler.php.

◆ getScriptUrl()

string TYPO3\CMS\Recordlist\LinkHandler\RecordLinkHandler::getScriptUrl ( )

Returns the URL of the current script

Returns
‪string

Implements TYPO3\CMS\Recordlist\Tree\View\LinkParameterProviderInterface.

Definition at line 239 of file RecordLinkHandler.php.

◆ getUrlParameters()

string [] TYPO3\CMS\Recordlist\LinkHandler\RecordLinkHandler::getUrlParameters ( array  $values)

Returns all parameters needed to build a URL with all the necessary information.

Parameters
array$values‪Array of values to include into the parameters or which might influence the parameters
Returns
‪string[] Array of parameters which have to be added to URLs

Implements TYPO3\CMS\Recordlist\Tree\View\LinkParameterProviderInterface.

Definition at line 209 of file RecordLinkHandler.php.

Referenced by TYPO3\CMS\Recordlist\LinkHandler\RecordLinkHandler\render().

◆ initialize()

TYPO3\CMS\Recordlist\LinkHandler\RecordLinkHandler::initialize ( AbstractLinkBrowserController  $linkBrowser,
  $identifier,
array  $configuration 
)

Initializes the handler.

Parameters
AbstractLinkBrowserController$linkBrowser
string$identifier
array$configuration‪Page TSconfig

Reimplemented from TYPO3\CMS\Recordlist\LinkHandler\AbstractLinkHandler.

Definition at line 66 of file RecordLinkHandler.php.

References TYPO3\CMS\Recordlist\LinkHandler\RecordLinkHandler\$configuration, TYPO3\CMS\Recordlist\LinkHandler\RecordLinkHandler\$identifier, and TYPO3\CMS\Recordlist\LinkHandler\AbstractLinkHandler\$linkBrowser.

◆ isCurrentlySelectedItem()

bool TYPO3\CMS\Recordlist\LinkHandler\RecordLinkHandler::isCurrentlySelectedItem ( array  $values)

Checks if the submitted page matches the current page.

Parameters
array$values‪Values to be checked
Returns
‪bool Returns TRUE if the given values match the currently selected item

Implements TYPO3\CMS\Recordlist\Tree\View\LinkParameterProviderInterface.

Definition at line 229 of file RecordLinkHandler.php.

◆ render()

◆ renderPageTree()

string TYPO3\CMS\Recordlist\LinkHandler\RecordLinkHandler::renderPageTree ( )
protected

Member Data Documentation

◆ $configuration

array TYPO3\CMS\Recordlist\LinkHandler\RecordLinkHandler::$configuration = array( )
protected

Specific TSconfig for the current instance (corresponds to TCEMAIN.linkHandler.record.identifier.configuration)

Definition at line 47 of file RecordLinkHandler.php.

Referenced by TYPO3\CMS\Recordlist\LinkHandler\RecordLinkHandler\initialize().

◆ $expandPage

int TYPO3\CMS\Recordlist\LinkHandler\RecordLinkHandler::$expandPage = 0
protected

Definition at line 57 of file RecordLinkHandler.php.

◆ $identifier

string TYPO3\CMS\Recordlist\LinkHandler\RecordLinkHandler::$identifier
protected

Configuration key in TSconfig TCEMAIN.linkHandler.record

Definition at line 41 of file RecordLinkHandler.php.

Referenced by TYPO3\CMS\Recordlist\LinkHandler\RecordLinkHandler\initialize().

◆ $linkParts

array TYPO3\CMS\Recordlist\LinkHandler\RecordLinkHandler::$linkParts = array( )
protected

Parts of the current link

Definition at line 53 of file RecordLinkHandler.php.

Referenced by TYPO3\CMS\Recordlist\LinkHandler\RecordLinkHandler\canHandleLink().