‪TYPO3CMS  ‪main
TYPO3\CMS\Backend\Template\Components\Buttons\DropDown\DropDownItem Class Reference
Inheritance diagram for TYPO3\CMS\Backend\Template\Components\Buttons\DropDown\DropDownItem:
TYPO3\CMS\Backend\Template\Components\Buttons\DropDown\AbstractDropDownItem TYPO3\CMS\Backend\Template\Components\Buttons\DropDown\DropDownItemInterface

Public Member Functions

 setTag (string $tag)
 
 getTag ()
 
 render ()
 
- ‪Public Member Functions inherited from ‪TYPO3\CMS\Backend\Template\Components\Buttons\DropDown\AbstractDropDownItem
 getIcon ()
 
 setIcon (?Icon $icon)
 
 getLabel ()
 
 setLabel (?string $label)
 
 getTitle ()
 
 setTitle (?string $title)
 
 getHref ()
 
 setHref (?string $href)
 
 setAttributes (array $attributes)
 
 isValid ()
 
 getType ()
 
 __toString ()
 
- ‪Public Member Functions inherited from ‪TYPO3\CMS\Backend\Template\Components\Buttons\DropDown\DropDownItemInterface
 getType ()
 
 isValid ()
 

Protected Attributes

string $tag = 'a'
 
- ‪Protected Attributes inherited from ‪TYPO3\CMS\Backend\Template\Components\Buttons\DropDown\AbstractDropDownItem
string $tag = 'a'
 
Icon $icon = null
 
string $label = null
 
string $title = null
 
string $href = null
 
array $attributes = []
 

Additional Inherited Members

- ‪Public Attributes inherited from ‪TYPO3\CMS\Backend\Template\Components\Buttons\DropDown\AbstractDropDownItem
array< string, function getAttributes():array { return $this-> attributes
 
- ‪Protected Member Functions inherited from ‪TYPO3\CMS\Backend\Template\Components\Buttons\DropDown\AbstractDropDownItem
 getAttributesString ()
 
 getRenderedIcon ()
 

Detailed Description

DropDownItem

This dropdown item type renders a simple element. Use this element if you need a link, button.

$item = GeneralUtility::makeInstance(DropDownItem::class) ->setTag('a') ->setHref('#') ->setLabel('Label') ->setTitle('Title') ->setIcon($this->iconFactory->getIcon('actions-heart')) ->setAttributes(['data-value' => '123']); $dropDownButton->addItem($item);

Definition at line 33 of file DropDownItem.php.

Member Function Documentation

◆ getTag()

TYPO3\CMS\Backend\Template\Components\Buttons\DropDown\DropDownItem::getTag ( )

◆ render()

◆ setTag()

TYPO3\CMS\Backend\Template\Components\Buttons\DropDown\DropDownItem::setTag ( string  $tag)

Member Data Documentation

◆ $tag

string TYPO3\CMS\Backend\Template\Components\Buttons\DropDown\DropDownItem::$tag = 'a'
protected