function SvgIconBuilder::build

Same name and namespace in other branches
  1. 11.x core/lib/Drupal/Core/Layout/Icon/SvgIconBuilder.php \Drupal\Core\Layout\Icon\SvgIconBuilder::build()

File

core/lib/Drupal/Core/Layout/Icon/SvgIconBuilder.php, line 57

Class

SvgIconBuilder
Builds SVG layout icons.

Namespace

Drupal\Core\Layout\Icon

Code

public function build(array $icon_map) {
  $regions = $this->calculateSvgValues($icon_map, $this->width, $this->height, $this->strokeWidth, $this->padding);
  return $this->buildRenderArray($regions, $this->width, $this->height, $this->strokeWidth);
}

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