@@ 12-29 (lines=18) @@ | ||
9 | /** |
|
10 | * "footer" element |
|
11 | */ |
|
12 | class Footer extends OpenElement implements FlowContent |
|
13 | { |
|
14 | protected function removeInvalidSelf(LoggerInterface $logger) |
|
15 | { |
|
16 | $footer = new self($this->configuration, 'footer'); |
|
17 | $header = new Header($this->configuration, 'header'); |
|
18 | $main = new Main($this->configuration, 'main'); |
|
19 | if ($this->hasAncestor($footer) || |
|
20 | $this->hasAncestor($header) || |
|
21 | $this->hasAncestor($main)) { |
|
22 | $logger->debug('Removing ' . $this . '. Element "footer" should not be a descendant of "footer", "header", or "main" elements.'); |
|
23 | ||
24 | return true; |
|
25 | } |
|
26 | ||
27 | return false; |
|
28 | } |
|
29 | } |
|
30 |
@@ 12-29 (lines=18) @@ | ||
9 | /** |
|
10 | * "header" element |
|
11 | */ |
|
12 | class Header extends OpenElement implements FlowContent |
|
13 | { |
|
14 | protected function removeInvalidSelf(LoggerInterface $logger) |
|
15 | { |
|
16 | $footer = new Footer($this->configuration, 'footer'); |
|
17 | $header = new self($this->configuration, 'header'); |
|
18 | $main = new Main($this->configuration, 'main'); |
|
19 | if ($this->hasAncestor($footer) || |
|
20 | $this->hasAncestor($header) || |
|
21 | $this->hasAncestor($main)) { |
|
22 | $logger->debug('Removing ' . $this . '. Element "header" should not be a descendant of "footer", "header", or "main" elements.'); |
|
23 | ||
24 | return true; |
|
25 | } |
|
26 | ||
27 | return false; |
|
28 | } |
|
29 | } |
|
30 |