inline_documentation-2.0.0-alpha1/inline_documentation.install

inline_documentation.install
<?php

/**
 * @file
 * Installation hooks for Inline Documentation module.
 */

/**
 * Implements hook_uninstall().
 */
function inline_documentation_uninstall() {
  // Delete all existing inline documentation nodes.
  $storage_handler = \Drupal::entityTypeManager()->getStorage('node');
  $nodes = $storage_handler->loadByProperties(['type' => 'inline_documentation']);
  $storage_handler->delete($nodes);

  // Delete content type.
  $content_type = \Drupal::entityTypeManager()
    ->getStorage('node_type')
    ->load('inline_documentation');

  if ($content_type) {
    $content_type->delete();
  }

  // Delete settings.
  \Drupal::configFactory()->getEditable('inline_documentation.settings')->delete();
}

Главная | Обратная связь

drupal hosting | друпал хостинг | it patrol .inc