You are here

function lightning_media_update_8005 in Lightning Media 8.3

Same name and namespace in other branches
  1. 8.4 lightning_media.install \lightning_media_update_8005()
  2. 8 lightning_media.install \lightning_media_update_8005()
  3. 8.2 lightning_media.install \lightning_media_update_8005()

Installs the media browser and its embed button.

File

./lightning_media.install, line 126
Contains install and update routines for Lightning Media.

Code

function lightning_media_update_8005() {
  \Drupal::service('module_installer')
    ->install([
    'entity_browser',
  ]);
  $config = Config::forModule('lightning_media');
  $config
    ->getEntity('entity_form_mode', 'media.media_browser')
    ->save();
  $config
    ->getEntity('entity_browser', 'media_browser')
    ->save();
  $config
    ->getEntity('embed_button', 'media_browser')
    ->save();
}