You are here

function iframe_uninstall in Iframe 8

Same name and namespace in other branches
  1. 8.2 iframe.install \iframe_uninstall()
  2. 6 iframe.install \iframe_uninstall()

Implements hook_uninstall().

File

./iframe.install, line 21
Contains install, uninstall and update functions for IFrame.

Code

function iframe_uninstall() {

  // Remove all from cache.
  \Drupal::cache('data')
    ->deleteAll();

  // Remove the iframe fields.
  $storage = \Drupal::entityTypeManager()
    ->getStorage('field_storage_config');
  $fields = $storage
    ->loadByProperties([
    'type' => 'iframe',
  ]);
  $storage
    ->delete($fields);
}