forked from openeuropa/oe_media
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathoe_media.install
38 lines (33 loc) · 862 Bytes
/
oe_media.install
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
<?php
/**
* @file
* Contains installation hooks.
*/
declare(strict_types=1);
/**
* Updates mapping of remote video media type.
*/
function oe_media_update_8001() {
$config_factory = \Drupal::configFactory();
$config = $config_factory->getEditable('media.type.remote_video');
$config->clear('field_map.url');
$config->save();
}
/**
* Enables standalone url for media entities.
*/
function oe_media_update_8002() {
$config_factory = \Drupal::configFactory();
$config = $config_factory->getEditable('media.settings');
$config->set('standalone_url', TRUE);
$config->save();
}
/**
* Reverts standalone url value for media entities.
*/
function oe_media_update_8003() {
$config_factory = \Drupal::configFactory();
$config = $config_factory->getEditable('media.settings');
$config->set('standalone_url', FALSE);
$config->save();
}