You are here

function modal_page_update_8208 in Modal 8.2

Same name and namespace in other branches
  1. 8.3 modal_page.install \modal_page_update_8208()
  2. 5.0.x modal_page.install \modal_page_update_8208()
  3. 4.0.x modal_page.install \modal_page_update_8208()
  4. 4.1.x modal_page.install \modal_page_update_8208()

Created new field to restrict Modal by Role.

File

./modal_page.install, line 60
Install, update and uninstall functions for the Modal Page.

Code

function modal_page_update_8208() {
  $modalPageFieldHelper = new ModalPageFieldHelper();
  $fieldRole = $modalPageFieldHelper
    ->getFieldRole();
  \Drupal::entityDefinitionUpdateManager()
    ->installFieldStorageDefinition('roles', 'modal_page_modal', 'modal_page_modal', $fieldRole);
}