Issue #2962110 by samuel.mortenson, drpal, andrewmacpherson, ckrina, phenaproxima, yoroy, webchick, amateescu, chr.fritsch, starshaped, lauriii, webflo, Dennis Cohn, dawehner, seanB, rfmarcelino, DyanneNova, benjifisher, jan.stoeckler, danbohea, John Pitcairn: Add the Media Library module to Drupal core
2018-06-22 14:05:00 +00:00
|
|
|
<?php
|
|
|
|
|
|
|
|
/**
|
|
|
|
* @file
|
|
|
|
* Install, update and uninstall functions for the media_library module.
|
|
|
|
*/
|
|
|
|
|
Issue #2988433 by seanB, samuel.mortenson, rodrigoaguilera, chr.fritsch, Wim Leers, katzilla, phenaproxima, tim.plunkett, alexpott, tstoeckler, marcoscano, webchick: Automatically create and configure Media Library view and form displays
2019-02-06 09:27:18 +00:00
|
|
|
use Drupal\media\Entity\MediaType;
|
Issue #2962110 by samuel.mortenson, drpal, andrewmacpherson, ckrina, phenaproxima, yoroy, webchick, amateescu, chr.fritsch, starshaped, lauriii, webflo, Dennis Cohn, dawehner, seanB, rfmarcelino, DyanneNova, benjifisher, jan.stoeckler, danbohea, John Pitcairn: Add the Media Library module to Drupal core
2018-06-22 14:05:00 +00:00
|
|
|
|
|
|
|
/**
|
|
|
|
* Implements hook_install().
|
|
|
|
*/
|
2019-12-05 10:07:59 +00:00
|
|
|
function media_library_install($is_syncing) {
|
|
|
|
if (!$is_syncing) {
|
Issue #2988433 by seanB, samuel.mortenson, rodrigoaguilera, chr.fritsch, Wim Leers, katzilla, phenaproxima, tim.plunkett, alexpott, tstoeckler, marcoscano, webchick: Automatically create and configure Media Library view and form displays
2019-02-06 09:27:18 +00:00
|
|
|
foreach (MediaType::loadMultiple() as $type) {
|
|
|
|
_media_library_configure_form_display($type);
|
|
|
|
_media_library_configure_view_display($type);
|
|
|
|
}
|
|
|
|
}
|
Issue #2962110 by samuel.mortenson, drpal, andrewmacpherson, ckrina, phenaproxima, yoroy, webchick, amateescu, chr.fritsch, starshaped, lauriii, webflo, Dennis Cohn, dawehner, seanB, rfmarcelino, DyanneNova, benjifisher, jan.stoeckler, danbohea, John Pitcairn: Add the Media Library module to Drupal core
2018-06-22 14:05:00 +00:00
|
|
|
}
|
|
|
|
|
Issue #2988433 by seanB, samuel.mortenson, rodrigoaguilera, chr.fritsch, Wim Leers, katzilla, phenaproxima, tim.plunkett, alexpott, tstoeckler, marcoscano, webchick: Automatically create and configure Media Library view and form displays
2019-02-06 09:27:18 +00:00
|
|
|
/**
|
Issue #3087644 by jibran, Berdir, alexpott, longwave, Wim Leers, amateescu, catch, xjm, larowlan, dpi, quietone: Remove Drupal 8 updates up to and including 88**
2020-01-24 23:52:03 +00:00
|
|
|
* Implements hook_update_last_removed().
|
Issue #2988433 by seanB, samuel.mortenson, rodrigoaguilera, chr.fritsch, Wim Leers, katzilla, phenaproxima, tim.plunkett, alexpott, tstoeckler, marcoscano, webchick: Automatically create and configure Media Library view and form displays
2019-02-06 09:27:18 +00:00
|
|
|
*/
|
Issue #3087644 by jibran, Berdir, alexpott, longwave, Wim Leers, amateescu, catch, xjm, larowlan, dpi, quietone: Remove Drupal 8 updates up to and including 88**
2020-01-24 23:52:03 +00:00
|
|
|
function media_library_update_last_removed() {
|
|
|
|
return 8704;
|
Issue #3034242 by oknate, phenaproxima, Wim Leers, webchick, seanB, larowlan, bnjmnm, jrockowitz, ckrina, benjifisher, andrewmacpherson, dww, jibran: Hide "Save and insert" and "Additional selected media" from users by default
2019-10-11 16:17:23 +00:00
|
|
|
}
|