You are here

public function EventSubscriber::onRequest in JS Callback Handler 8.3

Same name in this branch
  1. 8.3 src/EventSubscriber.php \Drupal\js\EventSubscriber::onRequest()
  2. 8.3 js_callback_examples/src/EventSubscriber.php \Drupal\js_callback_examples\EventSubscriber::onRequest()

For

File

js_callback_examples/src/EventSubscriber.php, line 40

Class

EventSubscriber
EventSubscriber.

Namespace

Drupal\js_callback_examples

Code

public function onRequest() {

  // Only show this message if not executing a JS Callback.
  if (!$this->js
    ->isExecuting()) {
    drupal_set_message(t('You have the JS Example module enabled. Please make sure you disable it when you are done. View <a href=":url">example page</a>.', [
      ':url' => Url::fromRoute('js_callback_examples.form')
        ->toString(),
    ]), 'status');
  }
}