You are here

function social_book_update_8803 in Open Social 8.9

Same name and namespace in other branches
  1. 8.8 modules/social_features/social_book/social_book.install \social_book_update_8803()
  2. 10.3.x modules/social_features/social_book/social_book.install \social_book_update_8803()
  3. 10.0.x modules/social_features/social_book/social_book.install \social_book_update_8803()
  4. 10.1.x modules/social_features/social_book/social_book.install \social_book_update_8803()
  5. 10.2.x modules/social_features/social_book/social_book.install \social_book_update_8803()

Update search all with book pages.

File

modules/social_features/social_book/social_book.install, line 176
Install, update and uninstall functions for the social_book module.

Code

function social_book_update_8803() {

  // If the search module is enabled trigger updating of the indexes affected
  // by the book update in config override.
  try {
    $index = Index::load('social_all');
    if ($index !== NULL && $index
      ->status()) {
      $index
        ->save();
      $index
        ->clear();
      $index
        ->reindex();
    }
  } catch (EntityStorageException $e) {
    \Drupal::logger('social_book')
      ->info($e
      ->getMessage());
  }
}