You are here

protected function views_timelinejs_plugin_style_timelinejs::handle_xml_errors in Views TimelineJS integration 7.3

Sets Drupal messages to inform users of HTML parsing errors.

Parameters

\LibXMLError $error: Contains information about the XML parsing error.

type $html: Contains the original HTML that was parsed.

1 call to views_timelinejs_plugin_style_timelinejs::handle_xml_errors()
views_timelinejs_plugin_style_timelinejs::extract_url in ./views_timelinejs_plugin_style_timelinejs.inc
Searches a string for HTML attributes that contain URLs and returns them.

File

./views_timelinejs_plugin_style_timelinejs.inc, line 702

Class

views_timelinejs_plugin_style_timelinejs
Style plugin to render items as TimelineJS3 slides.

Code

protected function handle_xml_errors(\LibXMLError $error, $html) {
  $message = t('A media field has an error in its HTML.<br>Error message: @message<br>Views result row: @row<br>HTML: <pre>@html</pre>', array(
    '@message' => $error->message,
    '@row' => $this->view->row_index,
    '@html' => $html,
  ));
  drupal_set_message($message, 'warning');
}