‪TYPO3CMS  ‪main
TYPO3\CMS\Backend\Form\Element\LinkElement Class Reference
Inheritance diagram for TYPO3\CMS\Backend\Form\Element\LinkElement:
TYPO3\CMS\Backend\Form\Element\AbstractFormElement TYPO3\CMS\Backend\Form\AbstractNode TYPO3\CMS\Backend\Form\NodeInterface

Public Member Functions

 __construct (private readonly IconFactory $iconFactory, private readonly EventDispatcherInterface $eventDispatcher, private readonly TypoLinkCodecService $typoLinkCodecService, private readonly LinkService $linkService,)
 
array render ()
 
- ‪Public Member Functions inherited from ‪TYPO3\CMS\Backend\Form\Element\AbstractFormElement
 injectNodeFactory (NodeFactory $nodeFactory)
 
- ‪Public Member Functions inherited from ‪TYPO3\CMS\Backend\Form\AbstractNode
 setData (array $data)
 

Protected Member Functions

 getLinkExplanation (string $itemValue)
 
 initializeLinkPopup (array $fieldConfig)
 
 resolveAllowedTypes (array $allowedTypes)
 
 getRecordLinkHandlers ()
 
 getLinkHandlerIdentifiers (array $linkHandlers)
 
- ‪Protected Member Functions inherited from ‪TYPO3\CMS\Backend\Form\Element\AbstractFormElement
array renderFieldInformation ()
 
array renderFieldControl ()
 
array renderFieldWizard ()
 
 renderLabel (string $for)
 
 wrapWithFieldsetAndLegend (string $innerHTML)
 
 hasNullCheckboxButNoPlaceholder ()
 
 hasNullCheckboxWithPlaceholder ()
 
string formatValue ($format, $itemValue, $formatOptions=[])
 
int formMaxWidth ($size=48)
 
 resolveJavaScriptEvaluation (array $resultArray, string $name, ?object $evalObject)
 
string checkBoxParams (string $itemName, int $formElementValue, int $checkbox, int $checkboxesCount, array $fieldChangeFuncs=[], bool $invert=false)
 
 calculateColumnMarkup (int $cols)
 
 appendValueToLabelInDebugMode (string|int $label, string|int $value)
 
 getLanguageService ()
 
 getBackendUser ()
 
- ‪Protected Member Functions inherited from ‪TYPO3\CMS\Backend\Form\AbstractNode
 initializeResultArray ()
 
array mergeChildReturnIntoExistingResult (array $existing, array $childReturn, bool $mergeHtml=true)
 
 getValidationDataAsJsonString (array $config)
 

Protected Attributes

array $defaultFieldInformation
 
array $defaultFieldWizard
 
- ‪Protected Attributes inherited from ‪TYPO3\CMS\Backend\Form\Element\AbstractFormElement
int $defaultInputWidth = 30
 
int $minimumInputWidth = 10
 
int $maxInputWidth = 50
 
NodeFactory $nodeFactory
 
- ‪Protected Attributes inherited from ‪TYPO3\CMS\Backend\Form\AbstractNode
array $data = []
 
array $defaultFieldInformation = array( )
 
array $defaultFieldControl = array( )
 
array $defaultFieldWizard = array( )
 

Detailed Description

Link element.

Shows current link and the link popup.

Definition at line 45 of file LinkElement.php.

Constructor & Destructor Documentation

◆ __construct()

TYPO3\CMS\Backend\Form\Element\LinkElement::__construct ( private readonly IconFactory  $iconFactory,
private readonly EventDispatcherInterface  $eventDispatcher,
private readonly TypoLinkCodecService  $typoLinkCodecService,
private readonly LinkService  $linkService 
)

Definition at line 79 of file LinkElement.php.

Member Function Documentation

◆ getLinkExplanation()

◆ getLinkHandlerIdentifiers()

TYPO3\CMS\Backend\Form\Element\LinkElement::getLinkHandlerIdentifiers ( array  $linkHandlers)
protected

◆ getRecordLinkHandlers()

TYPO3\CMS\Backend\Form\Element\LinkElement::getRecordLinkHandlers ( )
protected

Returns the identifiers of link handlers, using the RecordLinkHandler class

Definition at line 513 of file LinkElement.php.

References TYPO3\CMS\Backend\Form\Element\LinkElement\getLinkHandlerIdentifiers().

Referenced by TYPO3\CMS\Backend\Form\Element\LinkElement\resolveAllowedTypes().

◆ initializeLinkPopup()

TYPO3\CMS\Backend\Form\Element\LinkElement::initializeLinkPopup ( array  $fieldConfig)
protected

Initializes the LinkPopup FieldControl by processing the field specific configuration and by creating the necessary options array for the FieldControl.

Definition at line 458 of file LinkElement.php.

References TYPO3\CMS\Backend\Form\Element\LinkElement\resolveAllowedTypes().

Referenced by TYPO3\CMS\Backend\Form\Element\LinkElement\render().

◆ render()

array TYPO3\CMS\Backend\Form\Element\LinkElement::render ( )

This will render a single-line link form field, possibly with various control/validation features

Returns
‪array As defined in initializeResultArray() of AbstractNode

Reimplemented from TYPO3\CMS\Backend\Form\AbstractNode.

Definition at line 91 of file LinkElement.php.

References TYPO3\CMS\Core\Page\JavaScriptModuleInstruction\create(), TYPO3\CMS\Core\Utility\GeneralUtility\fixed_lgd_cs(), TYPO3\CMS\Core\Utility\MathUtility\forceIntegerInRange(), TYPO3\CMS\Backend\Form\Element\AbstractFormElement\formMaxWidth(), TYPO3\CMS\Backend\Form\Element\AbstractFormElement\getLanguageService(), TYPO3\CMS\Backend\Form\Element\LinkElement\getLinkExplanation(), TYPO3\CMS\Core\Utility\StringUtility\getUniqueId(), TYPO3\CMS\Backend\Form\AbstractNode\getValidationDataAsJsonString(), TYPO3\CMS\Backend\Form\Element\AbstractFormElement\hasNullCheckboxButNoPlaceholder(), TYPO3\CMS\Backend\Form\Element\AbstractFormElement\hasNullCheckboxWithPlaceholder(), TYPO3\CMS\Backend\Form\Element\LinkElement\initializeLinkPopup(), TYPO3\CMS\Backend\Form\AbstractNode\initializeResultArray(), TYPO3\CMS\Backend\Form\AbstractNode\mergeChildReturnIntoExistingResult(), TYPO3\CMS\Backend\Form\Element\AbstractFormElement\renderFieldControl(), TYPO3\CMS\Backend\Form\Element\AbstractFormElement\renderFieldInformation(), TYPO3\CMS\Backend\Form\Element\AbstractFormElement\renderFieldWizard(), and TYPO3\CMS\Backend\Form\Element\AbstractFormElement\renderLabel().

Referenced by TYPO3\CMS\Backend\Form\Element\LinkElement\getLinkExplanation().

◆ resolveAllowedTypes()

TYPO3\CMS\Backend\Form\Element\LinkElement::resolveAllowedTypes ( array  $allowedTypes)
protected

This method applies further processing to a given allow list

Definition at line 495 of file LinkElement.php.

References TYPO3\CMS\Backend\Form\Element\LinkElement\getRecordLinkHandlers().

Referenced by TYPO3\CMS\Backend\Form\Element\LinkElement\initializeLinkPopup().

Member Data Documentation

◆ $defaultFieldInformation

array TYPO3\CMS\Backend\Form\Element\LinkElement::$defaultFieldInformation
protected
Initial value:
= array(
'tcaDescription' => [
'renderType' => 'tcaDescription',
],
)

Default field information enabled for this element.

Definition at line 51 of file LinkElement.php.

◆ $defaultFieldWizard

array TYPO3\CMS\Backend\Form\Element\LinkElement::$defaultFieldWizard
protected
Initial value:
= array(
'localizationStateSelector' => [
'renderType' => 'localizationStateSelector',
],
'otherLanguageContent' => [
'renderType' => 'otherLanguageContent',
'after' => [
'localizationStateSelector',
],
],
'defaultLanguageDifferences' => [
'renderType' => 'defaultLanguageDifferences',
'after' => [
'otherLanguageContent',
],
],
)

Default field wizards enabled for this element.

Definition at line 61 of file LinkElement.php.