You are here

function file_management_view_install in File Management 8

Implements hook_install().

File

modules/file_management_view/file_management_view.install, line 11
Install, update and uninstall functions for the file_management_view module.

Code

function file_management_view_install() {

  // Disable the existing files view since we add our own view.
  $files_view = \Drupal::entityTypeManager()
    ->getStorage('view')
    ->load('files');
  if (!empty($files_view)) {
    $files_view
      ->setStatus(FALSE);
    $files_view
      ->save();
  }
}