Updated to Drupal 8.5. Core Media not yet in use.
[yaffs-website] / web / core / modules / views / src / Plugin / views / HandlerBase.php
index 4cc4e4bb169b3c9fc332ad5533bc254224d3ecad..a50f9cdab393305f5ac0b6b5d2ff6241bb55e161 100644 (file)
@@ -845,4 +845,19 @@ abstract class HandlerBase extends PluginBase implements ViewsHandlerInterface {
     return $form_state_options + $options;
   }
 
+  /**
+   * {@inheritdoc}
+   */
+  public function calculateDependencies() {
+    $dependencies = parent::calculateDependencies();
+    if ($this->table) {
+      // Ensure that the view depends on the module that provides the table.
+      $data = $this->getViewsData()->get($this->table);
+      if (isset($data['table']['provider'])) {
+        $dependencies['module'][] = $data['table']['provider'];
+      }
+    }
+    return $dependencies;
+  }
+
 }