protected function BaseValidatorForm::domExtractor in Advanced CSS/JS Aggregation 8.2
Same name and namespace in other branches
- 8.4 advagg_validator/src/Form/BaseValidatorForm.php \Drupal\advagg_validator\Form\BaseValidatorForm::domExtractor()
- 8.3 advagg_validator/src/Form/BaseValidatorForm.php \Drupal\advagg_validator\Form\BaseValidatorForm::domExtractor()
Extract info from the DOMNode Object.
Parameters
object $dom: DOMNode Class.
Return value
array Key Value pair from the DOM Node.
1 call to BaseValidatorForm::domExtractor()
- CssW3Form::parseSoapResponse in advagg_validator/
src/ Form/ CssW3Form.php
File
- advagg_validator/
src/ Form/ BaseValidatorForm.php, line 341
Class
- BaseValidatorForm
- Base form for all advagg validator options.
Namespace
Drupal\advagg_validator\FormCode
protected function domExtractor($dom) {
$node = $dom->firstChild;
$output = [];
do {
$text = trim($node->nodeValue);
if (!empty($text)) {
$key = str_replace('m:', '', $node->nodeName);
$output[$key] = $text;
}
} while ($node = $node->nextSibling);
return $output;
}