function IconDefinition::getData

Get a specific icon data.

Parameters

string $key: The data key to retrieve.

Return value

mixed The icon specific data if exist or null. The data being added as an array by extractors, there is no specific type enforced.

Overrides IconDefinitionInterface::getData

File

core/lib/Drupal/Core/Theme/Icon/IconDefinition.php, line 193

Class

IconDefinition
Handle an icon definition.

Namespace

Drupal\Core\Theme\Icon

Code

public function getData(string $key) : mixed {
  return $this->data[$key] ?? NULL;
}

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