function IconBuilderInterface::build
Builds a render array representation of an SVG based on an icon map.
Parameters
string[][] $icon_map: A two-dimensional array representing the visual output of the layout. For the following shape: |------------------------------| | | | 100% | | | |-------|--------------|-------| | | | | | | 50% | 25% | | | | | | 25% |--------------|-------| | | | | | 75% | | | | |------------------------------| The corresponding array would be:
- ['top']
 - ['first', 'second', 'second', 'third']
 - ['first', 'bottom', 'bottom', 'bottom'].
 
Return value
array A render array representing a SVG icon.
1 method overrides IconBuilderInterface::build()
- SvgIconBuilder::build in core/
lib/ Drupal/ Core/ Layout/ Icon/ SvgIconBuilder.php  - Builds a render array representation of an SVG based on an icon map.
 
File
- 
              core/
lib/ Drupal/ Core/ Layout/ Icon/ IconBuilderInterface.php, line 37  
Class
- IconBuilderInterface
 - Provides an interface for building layout icons.
 
Namespace
Drupal\Core\Layout\IconCode
public function build(array $icon_map);
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.