You are here

file_delete_ui.install in File Delete UI 1.x

File

file_delete_ui.install
View source
<?php

use Drupal\views\Entity\View;

/**
 * Implements hook_install().
 */
function file_delete_ui_install() {

  // Add the operations to the default core view.
  $config = \Drupal::configFactory()
    ->getEditable('views.view.files');
  if ($config) {
    $data = $config
      ->getRawData();
    $data['display']['default']['display_options']['fields']['operations'] = [
      'id' => 'operations',
      'table' => 'file_managed',
      'field' => 'operations',
      'label' => 'Operations',
    ];
    $config
      ->setData($data)
      ->save();
  }
}

Functions

Namesort descending Description
file_delete_ui_install Implements hook_install().