You are here

collapsiblock.install in Collapsiblock 8

Install, update and uninstall functions for the devel module.

File

collapsiblock.install
View source
<?php

/**
 * @file
 * Install, update and uninstall functions for the devel module.
 */
use Drupal\block\Entity\Block;

/**
 * Implements hook_uninstall().
 */
function collapsiblock_uninstall() {
  $blocks = Block::loadMultiple();
  foreach ($blocks as $block) {
    if (!empty($block
      ->get('collapsiblock'))) {
      \Drupal::configFactory()
        ->getEditable('block.block.' . $block
        ->get('id'))
        ->clear('collapsiblock')
        ->save();
    }
  }
  drupal_flush_all_caches();
}

Functions

Namesort descending Description
collapsiblock_uninstall Implements hook_uninstall().