You are here

dashboards.install in Dashboards with Layout Builder 8

Same filename and directory in other branches
  1. 2.0.x dashboards.install

Install, update, and uninstall functions for dashboards.module.

File

dashboards.install
View source
<?php

/**
 * @file
 * Install, update, and uninstall functions for dashboards.module.
 */

/**
 * Implements hook_uninstall().
 */
function dashboards_uninstall() {

  /** @var \Drupal\user\UserDataInterface $userData */
  $userData = \Drupal::service('user.data');
  $userData
    ->delete('dashboards');

  /** @var \Drupal\Core\Entity\EntityTypeManagerInterface $manager */
  $manager = \Drupal::service('entity_type.manager');
  $boards = $manager
    ->getStorage('dashboard')
    ->loadMultiple();
  $manager
    ->getStorage('dashboard')
    ->delete($boards);
}

Functions

Namesort descending Description
dashboards_uninstall Implements hook_uninstall().