}
}
- if (
- function_exists('module_exists') &&
- module_exists('views') &&
+ if ($config->userSystem->viewsExists() &&
(
$config->dsn != $config->userFrameworkDSN || !empty($drupal_prefix)
)
return NULL;
}
+ /**
+ * Determine if the Views module exists.
+ *
+ * @return bool
+ */
+ public function viewsExists() {
+ return FALSE;
+ }
+
}
return user_role_names();
}
+ /**
+ * Determine if the Views module exists.
+ *
+ * @return bool
+ */
+ public function viewsExists() {
+ if (\Drupal::moduleHandler()->moduleExists('views')) {
+ return TRUE;
+ }
+ return FALSE;
+ }
+
}
return array_combine(user_roles(), user_roles());
}
+ /**
+ * Determine if the Views module exists.
+ *
+ * @return bool
+ */
+ public function viewsExists() {
+ if (function_exists('module_exists') && module_exists('views')) {
+ return TRUE;
+ }
+ return FALSE;
+ }
+
}