function comment_uninstall
Same name in other branches
- 7.x modules/comment/comment.install \comment_uninstall()
- 8.9.x core/modules/comment/comment.install \comment_uninstall()
- 10 core/modules/comment/comment.install \comment_uninstall()
- 11.x core/modules/comment/comment.install \comment_uninstall()
Implements hook_uninstall().
File
-
core/
modules/ comment/ comment.install, line 14
Code
function comment_uninstall() {
// 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');
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.