Created
October 6, 2017 05:33
-
-
Save nikunjkotecha/a5c918c802c2f0e90e5e5366613a301e to your computer and use it in GitHub Desktop.
Code reference that didn't work
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* Update status field. | |
*/ | |
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); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment