function comment_update_8300

Update status field.

File

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

Code

function comment_update_8300() {
    $entity_definition_update_manager = \Drupal::service('entity.definition_update_manager');
    $field_definition = $entity_definition_update_manager->getFieldStorageDefinition('status', 'comment');
    $field_definition->setDescription(new TranslatableMarkup('A boolean indicating the published state.'))
        ->setRevisionable(TRUE);
    $entity_definition_update_manager->updateFieldStorageDefinition($field_definition);
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.