DropDownItem extends AbstractDropDownItem implements DropDownItemInterface
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);
Table of Contents
Interfaces
Properties
- $active : bool
- $attributes : array<string|int, mixed>
- $href : string|null
- $icon : Icon|null
- $label : string|null
- $tag : string
- $title : string|null
Methods
- __toString() : string
- getAttributes() : array<string, string>
- getHref() : string|null
- getIcon() : Icon|null
- getLabel() : string|null
- getTag() : string
- getTitle() : string|null
- getType() : string
- isActive() : bool
- isValid() : bool
- render() : string
- setActive() : self
- setAttributes() : self
- setHref() : self
- setIcon() : self
- setLabel() : self
- setTag() : self
- setTitle() : self
- getAttributesString() : string
- getRenderedIcon() : string
Properties
$active
protected
bool
$active
= false
$attributes
protected
array<string|int, mixed>
$attributes
= []
$href
protected
string|null
$href
= null
$icon
protected
Icon|null
$icon
= null
$label
protected
string|null
$label
= null
$tag
protected
string
$tag
= 'a'
$title
protected
string|null
$title
= null
Methods
__toString()
public
__toString() : string
Return values
stringgetAttributes()
public
getAttributes() : array<string, string>
Return values
array<string, string>getHref()
public
getHref() : string|null
Return values
string|nullgetIcon()
public
getIcon() : Icon|null
Return values
Icon|nullgetLabel()
public
getLabel() : string|null
Return values
string|nullgetTag()
public
getTag() : string
Return values
stringgetTitle()
public
getTitle() : string|null
Return values
string|nullgetType()
public
getType() : string
Return values
stringisActive()
public
isActive() : bool
Return values
boolisValid()
public
isValid() : bool
Return values
boolrender()
public
render() : string
Return values
stringsetActive()
public
setActive(bool $active) : self
Parameters
- $active : bool
Return values
selfsetAttributes()
public
setAttributes(array<string, string> $attributes) : self
Parameters
- $attributes : array<string, string>
Return values
selfsetHref()
public
setHref(string|null $href) : self
Parameters
- $href : string|null
Return values
selfsetIcon()
public
setIcon(Icon|null $icon) : self
Parameters
- $icon : Icon|null
Return values
selfsetLabel()
public
setLabel(string|null $label) : self
Parameters
- $label : string|null
Return values
selfsetTag()
public
setTag(string $tag) : self
Parameters
- $tag : string
Return values
selfsetTitle()
public
setTitle(string|null $title) : self
Parameters
- $title : string|null
Return values
selfgetAttributesString()
protected
getAttributesString() : string
Return values
stringgetRenderedIcon()
protected
getRenderedIcon() : string