@@ 43-51 (lines=9) @@ | ||
40 | ); |
|
41 | } |
|
42 | ||
43 | protected function removeInvalidChildren(LoggerInterface $logger) |
|
44 | { |
|
45 | foreach ($this->children as $child) { |
|
46 | if ($child instanceof InteractiveContent) { |
|
47 | $logger->debug('Removing ' . $child . '. No interactive content inside a "button" element.'); |
|
48 | $this->removeChild($child); |
|
49 | } |
|
50 | } |
|
51 | } |
|
52 | ||
53 | public function isInteractiveContent() |
|
54 | { |
@@ 18-27 (lines=10) @@ | ||
15 | */ |
|
16 | class Dfn extends OpenElement implements FlowContent, PhrasingContent, InlineElement |
|
17 | { |
|
18 | protected function removeInvalidChildren(LoggerInterface $logger) |
|
19 | { |
|
20 | // There must be no dfn element descendants. |
|
21 | foreach ($this->children as $child) { |
|
22 | if ($child instanceof self) { |
|
23 | $logger->debug('Removing ' . $child . '. Element "dfn" cannot contain "dfn" elements.'); |
|
24 | $this->removeChild($child); |
|
25 | } |
|
26 | } |
|
27 | } |
|
28 | ||
29 | protected function removeInvalidSelf(LoggerInterface $logger) |
|
30 | { |