function IconDefinitionInterface::create

Create an icon definition.

Parameters

string $pack_id: The id of the icon pack.

string $icon_id: The id of the icon.

string $template: The icon template from definition.

string|null $source: The source, url or path of the icon.

string|null $group: The group of the icon.

array $data: The additional data of the icon. Used by extractors to dynamically add any needed value.

Return value

self The icon definition.

1 method overrides IconDefinitionInterface::create()
IconDefinition::create in core/lib/Drupal/Core/Theme/Icon/IconDefinition.php
Create an icon definition.

File

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

Class

IconDefinitionInterface
Interface for icon definition.

Namespace

Drupal\Core\Theme\Icon

Code

public static function create(string $pack_id, string $icon_id, string $template, ?string $source = NULL, ?string $group = NULL, array $data = []) : self;

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.