Code
Explorer
You are a developer and looking for Shopware projects?
Apply Now!
SVGUse example
$id
=
$child
->
getAttribute
(
'id'
)
;
}
$use
= null;
foreach
(
$this
->
getChildren
(
$svg
->
getDocument
(
)
)
as
$child
)
{
if
(
$child
instanceof SVGUse
)
{
$use
=
$child
;
}
}
if
(
$use
=== null
)
{
$use
=
new
SVGUse
(
)
;
}
$use
->
setAttribute
(
'xlink:href', '#' .
$id
)
;
if
(
$fillcolor
)
{
$use
->
setAttribute
(
'fill',
$fillcolor
)
;
}
elseif
(
$cleanup
)
{
$use
->
removeAttribute
(
'fill'
)
;
}
if
(
$fillrule
)
{
$use
->
setAttribute
(
'fill-rule',
$fillrule
)
;
}
elseif
(
$cleanup
)
{