Commit e8faf779 authored by Julian Pustkuchen's avatar Julian Pustkuchen
Browse files

Issue #3271065 by Anybody: Move view admin_media_slideshow_overview into module (config/install)

parent 957f04c1
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -39,7 +39,7 @@ function drowl_header_slides_update_8002(&$sandbox) {
function drowl_header_slides_update_8003(&$sandbox) {
  $message = '';
  $old_view_id = 'admin_media_slideshow_overview';
  // Only delete and import, if the old view is existing.
  // Only delete the old view, if it is existing.
  if (\Drupal::moduleHandler()->moduleExists('views') && \Drupal\views\Entity\View::load($old_view_id)) {
    // Delete the old view
    $oldViewConfig = \Drupal::service('config.factory')->getEditable('views.view.' . $old_view_id);
@@ -51,7 +51,7 @@ function drowl_header_slides_update_8003(&$sandbox) {

  $message .= "\n";

  // Only create if the redirect view doesn't exist and views is enabled.
  // Only create if the new view doesn't exist and views is enabled.
  $new_view_id = 'drowl_header_slides_admin_media_slideshow';
  if (\Drupal::moduleHandler()->moduleExists('views') && !\Drupal\views\Entity\View::load($new_view_id)) {
    $config_path = \Drupal::service('extension.list.module')->getPath('drowl_header_slides') . '/config/install/views.view.' . $new_view_id .'.yml';