You are here

function lightning_core_update_8002 in Lightning Core 8.4

Same name and namespace in other branches
  1. 8.5 lightning_core.install \lightning_core_update_8002()
  2. 8 lightning_core.install \lightning_core_update_8002()
  3. 8.2 lightning_core.install \lightning_core_update_8002()
  4. 8.3 lightning_core.install \lightning_core_update_8002()

Marks certain node view modes as internal.

1 call to lightning_core_update_8002()
lightning_core_install in ./lightning_core.install
Implements hook_install().

File

./lightning_core.install, line 59
Contains install and update routines for Lightning.

Code

function lightning_core_update_8002() {
  $view_modes = EntityViewMode::loadMultiple([
    'node.rss',
    'node.search_index',
  ]);

  /** @var \Drupal\Core\Entity\EntityViewModeInterface $view_mode */
  foreach ($view_modes as $view_mode) {
    $view_mode
      ->setThirdPartySetting('lightning_core', 'internal', TRUE)
      ->save();
  }
}