src/Tokens/Elements/Meta.php 1 location
|
@@ 29-36 (lines=8) @@
|
26 |
|
); |
27 |
|
} |
28 |
|
|
29 |
|
protected function fixSelf(LoggerInterface $logger) |
30 |
|
{ |
31 |
|
// "name" attribute requires "content" attribute. |
32 |
|
if ($this->hasAttribute('name') && !$this->hasAttribute('content')) { |
33 |
|
$logger->debug('Modifying ' . $this . '. A "meta" element with a "name" attribute requires a "content" attribute. Adding empty "content" attribute.'); |
34 |
|
$this->addAttribute('content', ''); |
35 |
|
} |
36 |
|
} |
37 |
|
|
38 |
|
protected function removeInvalidSelf(LoggerInterface $logger) |
39 |
|
{ |
src/Tokens/Elements/A.php 1 location
|
@@ 43-51 (lines=9) @@
|
40 |
|
); |
41 |
|
} |
42 |
|
|
43 |
|
protected function fixSelf(LoggerInterface $logger) |
44 |
|
{ |
45 |
|
// If the "itemprop" attribute is specified on an "a" element, then |
46 |
|
// the "href" attribute must also be specified. |
47 |
|
if ($this->hasAttribute('itemprop') && !$this->hasAttribute('href')) { |
48 |
|
$logger->debug($this . ' with "itemprop" attribute requires the "href" attribute also. Adding empty "href" attribute.'); |
49 |
|
$this->addAttribute('href', ''); |
50 |
|
} |
51 |
|
} |
52 |
|
|
53 |
|
protected function removeInvalidChildren(LoggerInterface $logger) |
54 |
|
{ |
src/Tokens/Elements/Menu.php 1 location
|
@@ 33-39 (lines=7) @@
|
30 |
|
); |
31 |
|
} |
32 |
|
|
33 |
|
protected function fixSelf(LoggerInterface $logger) |
34 |
|
{ |
35 |
|
if (!$this->hasAttribute('type')) { |
36 |
|
$logger->debug('Modifying ' . $this . '. Adding the default "type" attribute for the "menu" element.'); |
37 |
|
$this->addAttribute('type', 'context'); |
38 |
|
} |
39 |
|
} |
40 |
|
|
41 |
|
protected function removeInvalidChildren(LoggerInterface $logger) |
42 |
|
{ |