You are here

function content_browser_uninstall in Content Browser 8

Implements hook_uninstall().

File

./content_browser.install, line 70
Defines install routines for Content Browser.

Code

function content_browser_uninstall() {
  \Drupal::configFactory()
    ->getEditable('embed.button.content_browser')
    ->delete();
  \Drupal::configFactory()
    ->getEditable('core.entity_view_mode.node.content_browser')
    ->delete();

  /** @var \Drupal\node\Entity\NodeType[] $types */
  $types = NodeType::loadMultiple();
  foreach ($types as $type) {
    if ($config = \Drupal::configFactory()
      ->getEditable('core.entity_view_display.node.' . $type
      ->id() . '.content_browser')) {
      $config
        ->delete();
    }
  }
}