Skip to main content
Drupal API
User account menu
  • Log in

Breadcrumb

  1. Drupal Core 11.1.x
  2. comment.install

function comment_uninstall

Implements hook_uninstall().

File

core/modules/comment/comment.install, line 14

Code

function comment_uninstall() : void {
    // Remove the comment fields.
    $storage = \Drupal::entityTypeManager()->getStorage('field_storage_config');
    $fields = $storage->loadByProperties([
        'type' => 'comment',
    ]);
    $storage->delete($fields);
    // Remove state setting.
    \Drupal::state()->delete('comment.node_comment_statistics_scale');
}
RSS feed
Powered by Drupal