15 public function transform($attr, $config, $context) {
16 if (!isset($attr[
'name']))
return $attr;
17 $name = $attr[
'name'];
18 if (isset($attr[
'id']) && $attr[
'id'] === $name)
return $attr;
19 $result = $this->idDef->validate($name, $config, $context);
20 if (
$result ===
false) unset($attr[
'name']);
Validates the HTML attribute ID.