protected function TimelineJS::handleXmlErrors in Views TimelineJS integration 8.3
Sets Drupal messages to inform users of HTML parsing errors.
Parameters
\LibXMLError $error: Contains information about the XML parsing error.
mixed $html: Contains the original HTML that was parsed.
1 call to TimelineJS::handleXmlErrors()
- TimelineJS::extractUrl in src/
Plugin/ views/ style/ TimelineJS.php - Searches a string for HTML attributes that contain URLs and returns them.
File
- src/
Plugin/ views/ style/ TimelineJS.php, line 778
Class
- TimelineJS
- Style plugin to render items as TimelineJS3 slides.
Namespace
Drupal\views_timelinejs\Plugin\views\styleCode
protected function handleXmlErrors(\LibXMLError $error, $html) {
$message = $this
->t('A media field has an error in its HTML.<br>Error message: @message<br>Views result row: @row<br>HTML: <pre>@html</pre>', [
'@message' => $error->message,
'@row' => $this->view->row_index,
'@html' => $html,
]);
$this
->messenger()
->addWarning($message);
}