src/Tokens/Elements/Dfn.php 1 location
|
@@ 31-41 (lines=11) @@
|
| 28 |
|
} |
| 29 |
|
} |
| 30 |
|
|
| 31 |
|
protected function removeInvalidSelf(LoggerInterface $logger) |
| 32 |
|
{ |
| 33 |
|
$dfn = new self($this->configuration); |
| 34 |
|
if ($this->hasAncestor($dfn)) { |
| 35 |
|
$logger->debug('Removing ' . $child . '. Element "dfn" cannot contain "dfn" elements.'); |
| 36 |
|
|
| 37 |
|
return true; |
| 38 |
|
} |
| 39 |
|
|
| 40 |
|
return false; |
| 41 |
|
} |
| 42 |
|
} |
| 43 |
|
|
src/Tokens/Elements/Form.php 1 location
|
@@ 35-45 (lines=11) @@
|
| 32 |
|
); |
| 33 |
|
} |
| 34 |
|
|
| 35 |
|
protected function removeInvalidSelf(LoggerInterface $logger) |
| 36 |
|
{ |
| 37 |
|
$form = new self($this->configuration, 'form'); |
| 38 |
|
if ($this->hasAncestor($form)) { |
| 39 |
|
$logger->debug('Removing ' . $this . '. Cannot be have a "form" element ancestor.'); |
| 40 |
|
|
| 41 |
|
return true; |
| 42 |
|
} |
| 43 |
|
|
| 44 |
|
return false; |
| 45 |
|
} |
| 46 |
|
} |
| 47 |
|
|
src/Tokens/Elements/Hgroup.php 1 location
|
@@ 44-56 (lines=13) @@
|
| 41 |
|
} |
| 42 |
|
} |
| 43 |
|
|
| 44 |
|
protected function removeInvalidSelf(LoggerInterface $logger) |
| 45 |
|
{ |
| 46 |
|
foreach ($this->children as $child) { |
| 47 |
|
if ($child instanceof HeadingContent) { |
| 48 |
|
return false; |
| 49 |
|
} |
| 50 |
|
} |
| 51 |
|
|
| 52 |
|
// Handle no child HeadingContent. |
| 53 |
|
$logger->debug('Removing ' . $this . '. Must contain at least one of the following elements: "h1", "h2", "h3", "h4", "h5", "h6", or "template".'); |
| 54 |
|
|
| 55 |
|
return true; |
| 56 |
|
} |
| 57 |
|
} |
| 58 |
|
|
src/Tokens/Elements/Label.php 1 location
|
@@ 31-41 (lines=11) @@
|
| 28 |
|
); |
| 29 |
|
} |
| 30 |
|
|
| 31 |
|
protected function removeInvalidSelf(LoggerInterface $logger) |
| 32 |
|
{ |
| 33 |
|
$label = new self($this->configuration, 'label'); |
| 34 |
|
if ($this->hasAncestor($label)) { |
| 35 |
|
$logger->debug('Removing ' . $this . '. Cannot be have "label" element ancestor.'); |
| 36 |
|
|
| 37 |
|
return true; |
| 38 |
|
} |
| 39 |
|
|
| 40 |
|
return false; |
| 41 |
|
} |
| 42 |
|
|
| 43 |
|
public function isInteractiveContent() |
| 44 |
|
{ |
src/Tokens/Elements/Input.php 1 location
|
@@ 62-72 (lines=11) @@
|
| 59 |
|
); |
| 60 |
|
} |
| 61 |
|
|
| 62 |
|
protected function removeInvalidSelf(LoggerInterface $logger) |
| 63 |
|
{ |
| 64 |
|
$input = new self($this->configuration, 'input'); |
| 65 |
|
if ($this->hasAncestor($input)) { |
| 66 |
|
$logger->debug('Removing ' . $this . '. Cannot be have "input" element ancestor.'); |
| 67 |
|
|
| 68 |
|
return true; |
| 69 |
|
} |
| 70 |
|
|
| 71 |
|
return false; |
| 72 |
|
} |
| 73 |
|
|
| 74 |
|
public function isInteractiveContent() |
| 75 |
|
{ |