public function MiconIcon::toRenderable in Micon 2.x
Same name and namespace in other branches
- 8 src/MiconIcon.php \Drupal\micon\MiconIcon::toRenderable()
Returns a render array representation of the object.
Return value
mixed[] A render array.
Overrides MiconIconInterface::toRenderable
2 calls to MiconIcon::toRenderable()
- MiconIcon::toJson in src/
MiconIcon.php - Returns a trimmed, json encoded string of the rendered markup.
- MiconIcon::toMarkup in src/
MiconIcon.php - Returns a fully rendered Markup representation of the object.
File
- src/
MiconIcon.php, line 165
Class
- MiconIcon
- Defines the Micon icon.
Namespace
Drupal\miconCode
public function toRenderable() {
return [
'#theme' => 'micon_icon',
'#icon' => $this,
'#attributes' => $this->attributes
->toArray(),
];
}