public function W3CProcessor::validatePage in W3C Validator 8
This method is responsible for the validation of a single page.
Parameters
array $page: This represents a page to validate.
array $query_options: This is a custom array of options for the query.
1 call to W3CProcessor::validatePage()
- W3CProcessor::validateAllPages in src/
W3CProcessor.php - Validates all flagged pages in the limit of the number given.
File
- src/
W3CProcessor.php, line 236
Class
- W3CProcessor
- Processor for page validation.
Namespace
Drupal\w3c_validatorCode
public function validatePage(array $page, array $query_options = []) {
// Build page query options.
$query_options['absolute'] = TRUE;
// Retrieve absolute URL.
$uri = Url::fromUri('base:' . $page['url'], $query_options)
->toString();
// Validate.
$validator = new Validator($this
->getValidatorUrl());
$result = $validator
->validateUrl($uri);
// Save result.
$this
->saveResult($result, $page['url']);
}