Skip to main content
Drupal API
User account menu
  • Log in

Breadcrumb

  1. Drupal Core 11.1.x
  2. IconDefinitionInterface.php

function IconDefinitionInterface::getRenderable

Get the icon renderable element array.

Shortcut to use icon element quickly without check if the icon id is valid, then the element will simply be empty.

Parameters

string $icon_full_id: The id of the icon including the pack.

array $settings: Settings to pass to the renderable for context. Can be indexed by the icon pack id for lookup.

Return value

array|null The icon renderable.

1 method overrides IconDefinitionInterface::getRenderable()
IconDefinition::getRenderable in core/lib/Drupal/Core/Theme/Icon/IconDefinition.php
Get the icon renderable element array.

File

core/lib/Drupal/Core/Theme/Icon/IconDefinitionInterface.php, line 85

Class

IconDefinitionInterface
Interface for icon definition.

Namespace

Drupal\Core\Theme\Icon

Code

public static function getRenderable(string $icon_full_id, array $settings = []) : ?array;
RSS feed
Powered by Drupal