function IconBuilderInterface::build
Same name in other branches
- 9 core/lib/Drupal/Core/Layout/Icon/IconBuilderInterface.php \Drupal\Core\Layout\Icon\IconBuilderInterface::build()
- 8.9.x core/lib/Drupal/Core/Layout/Icon/IconBuilderInterface.php \Drupal\Core\Layout\Icon\IconBuilderInterface::build()
- 10 core/lib/Drupal/Core/Layout/Icon/IconBuilderInterface.php \Drupal\Core\Layout\Icon\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.
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.