3 namespace Drupal\Core\Layout\Icon;
6 * Provides an interface for building layout icons.
8 interface IconBuilderInterface {
11 * Builds a render array representation of an SVG based on an icon map.
13 * @param string[][] $icon_map
14 * A two-dimensional array representing the visual output of the layout.
15 * For the following shape:
16 * |------------------------------|
20 * |-------|--------------|-------|
24 * | 25% |--------------|-------|
28 * |------------------------------|
29 * The corresponding array would be:
31 * - ['first', 'second', 'second', 'third']
32 * - ['first', 'bottom', 'bottom', 'bottom'].
35 * A render array representing a SVG icon.
37 public function build(array $icon_map);
43 * The machine name of the layout.
47 public function setId($id);
52 * @param string $label
53 * The label of the layout.
57 public function setLabel($label);
63 * The width of the SVG.
67 public function setWidth($width);
73 * The height of the SVG.
77 public function setHeight($height);
83 * The padding between regions.
87 public function setPadding($padding);
90 * Sets the stroke width.
92 * @param int|null $stroke_width
93 * The width of region borders.
97 public function setStrokeWidth($stroke_width);