annotate core/modules/media/media.post_update.php @ 19:fa3358dc1485 tip

Add ndrum files
author Chris Cannam
date Wed, 28 Aug 2019 13:14:47 +0100
parents af1871eacc83
children
rev   line source
Chris@14 1 <?php
Chris@14 2
Chris@14 3 /**
Chris@14 4 * @file
Chris@14 5 * Post update functions for Media.
Chris@14 6 */
Chris@14 7
Chris@14 8 /**
Chris@14 9 * Clear caches due to changes in local tasks and action links.
Chris@14 10 */
Chris@14 11 function media_post_update_collection_route() {
Chris@14 12 // Empty post-update hook.
Chris@14 13 }
Chris@17 14
Chris@17 15 /**
Chris@17 16 * Clear caches due to the addition of a Media-specific entity storage handler.
Chris@17 17 */
Chris@17 18 function media_post_update_storage_handler() {
Chris@17 19 // Empty post-update hook.
Chris@17 20 }
Chris@18 21
Chris@18 22 /**
Chris@18 23 * Keep media items viewable at /media/{id}.
Chris@18 24 */
Chris@18 25 function media_post_update_enable_standalone_url() {
Chris@18 26 $config = \Drupal::configFactory()->getEditable('media.settings');
Chris@18 27 if ($config->get('standalone_url') === NULL) {
Chris@18 28 $config->set('standalone_url', TRUE)->save(TRUE);
Chris@18 29 }
Chris@18 30 }