You are here

function modal_page_update_40004 in Modal 4.0.x

Same name and namespace in other branches
  1. 4.1.x modal_page.install \modal_page_update_40004()

Insert Modal Header and Modal Footer Line.

File

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

Code

function modal_page_update_40004() {

  // Load all Modals.
  $modals = \Drupal::entityTypeManager()
    ->getStorage('modal')
    ->loadMultiple();
  foreach ($modals as $modal) {

    // Set Insert Horizontal Line Header = TRUE as default.
    $modal
      ->setInsertHorizontalLineHeader(TRUE);

    // Set Insert Horizontal Line Footer = TRUE as default.
    $modal
      ->setInsertHorizontalLineFooter(TRUE);

    // Modal Safe.
    $modal
      ->save();
  }
}