Updated to Drupal 8.5. Core Media not yet in use.
[yaffs-website] / web / modules / contrib / entity_browser / src / Plugin / views / display / EntityBrowser.php
index bea8491576d8f0886a21dfa4bfa39ca60bcd0e29..5b382c3360e5cde7b76d9eea074881e0c97bed94 100644 (file)
@@ -44,6 +44,23 @@ class EntityBrowser extends DisplayPluginBase {
     return TRUE;
   }
 
+  /**
+   * {@inheritdoc}
+   */
+  public function getOption($option) {
+    // @todo remove upon resolution of https://www.drupal.org/node/2904798
+    // This overrides getOption() instead of ajaxEnabled() because
+    // \Drupal\views\Controller\ViewAjaxController::ajaxView() currently calls
+    // that directly.
+    if ($option == 'use_ajax') {
+      return TRUE;
+    }
+    else {
+      return parent::getOption($option);
+    }
+  }
+
+
   /**
    * {@inheritdoc}
    */