You are here

lightning_media_document.install in Lightning Media 8

File

modules/lightning_media_document/lightning_media_document.install
View source
<?php

use Drupal\lightning_core\ConfigHelper as Config;

/**
 * Creates the thumbnail display for documents.
 */
function lightning_media_document_update_8001() {
  Config::forModule('lightning_media_document')
    ->getEntity('entity_view_display', 'media.document.thumbnail')
    ->save();
}

/**
 * Implements hook_update_dependencies().
 */
function lightning_media_document_update_dependencies() {
  return [
    'lightning_media_document' => [
      // 8001 depends on the thumbnail view mode, which is created by
      // lightning_media 8015.
      8001 => [
        'lightning_media' => 8015,
      ],
    ],
  ];
}

Functions

Namesort descending Description
lightning_media_document_update_8001 Creates the thumbnail display for documents.
lightning_media_document_update_dependencies Implements hook_update_dependencies().