backports murph-skeleton
This commit is contained in:
parent
6f2a9e9c7b
commit
68cae2442f
|
@ -53,16 +53,16 @@ class CrudExtension extends AbstractExtension
|
||||||
}
|
}
|
||||||
|
|
||||||
if (is_callable($hrefConfig)) {
|
if (is_callable($hrefConfig)) {
|
||||||
$href = call_user_func($hrefConfig, $entity, $config['options']);
|
$attrs['href'] = call_user_func($hrefConfig, $entity, $config['options']);
|
||||||
} else {
|
} else {
|
||||||
$href = $hrefConfig;
|
$attrs['href'] = $hrefConfig;
|
||||||
}
|
}
|
||||||
|
|
||||||
foreach ($attrs as $k => $v) {
|
foreach ($attrs as $k => $v) {
|
||||||
$attributes .= sprintf('%s="%s" ', htmlspecialchars($k), htmlspecialchars($v));
|
$attributes .= sprintf(' %s="%s" ', htmlspecialchars($k), htmlspecialchars($v));
|
||||||
}
|
}
|
||||||
|
|
||||||
$render = sprintf('<a href="%s" %s>%s</a>', htmlspecialchars($href), $attributes, $render);
|
$render = sprintf('<a%s>%s</a>', $attributes, $render);
|
||||||
}
|
}
|
||||||
|
|
||||||
return $render;
|
return $render;
|
||||||
|
|
Loading…
Reference in a new issue