Skip to content

Commit b39b9f0

Browse files
Merge pull request #16 from dutchenkoOleg/master
svgSymbol
2 parents 3f93a3d + 651c01d commit b39b9f0

1 file changed

Lines changed: 3 additions & 2 deletions

File tree

src/WezomAgency/R2D2.php

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -207,12 +207,13 @@ public function cssRules($properties)
207207
/**
208208
* @param string $id
209209
* @param array $attrs
210+
* @param string $spritemap
210211
* @return string
211212
*/
212-
public function svgSymbol($id, $attrs = [])
213+
public function svgSymbol($id, $attrs = [], $spritemap = null)
213214
{
214215
$svgAttributes = $this->attrs($attrs);
215-
$useHref = $this->svgSpritemapPath . '#' . $id;
216+
$useHref = $spritemap ?: $this->svgSpritemapPath . '#' . $id;
216217
return '<svg ' . $svgAttributes . '><use xlink:href="' . $useHref . '"></use></svg>';
217218
}
218219

0 commit comments

Comments
 (0)