summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGabor Hojtsy2017-07-20 15:21:28 +0200
committerGabor Hojtsy2017-07-20 15:21:28 +0200
commit7da31e1eae097cb025e80b0f35fd20d4db19324d (patch)
tree68910ec3f33878743bfc469b847e5b7dd2995516
parent249e5252d9fcae67baf0d1ab7668d4e761ce1444 (diff)
Issue #2895857 by Wim Leers, chr.fritsch: Remove media_entity_operation_alter() as planned earlier
-rw-r--r--core/modules/media/media.module18
1 files changed, 0 insertions, 18 deletions
diff --git a/core/modules/media/media.module b/core/modules/media/media.module
index eeb2ac1..dc2d898 100644
--- a/core/modules/media/media.module
+++ b/core/modules/media/media.module
@@ -48,24 +48,6 @@ function media_theme() {
}
/**
- * Implements hook_entity_operation_alter().
- *
- * Fix broken operations array in field UI for entities with restricted access.
- *
- * @todo This hook can be removed when issue #2836384 is done.
- * @see https://www.drupal.org/node/2836384
- */
-function media_entity_operation_alter(array &$operations, EntityInterface $entity) {
- if ($entity instanceof FieldConfigInterface && $entity->getTargetEntityTypeId() === 'media') {
- /** @var \Drupal\media\MediaTypeInterface $media_type */
- $media_type = \Drupal::entityTypeManager()->getStorage('media_type')->load($entity->getTargetBundle());
- if ($entity->id() === 'media.' . $media_type->id() . '.' . $media_type->getSource()->getConfiguration()['source_field']) {
- unset($operations['delete']);
- }
- }
-}
-
-/**
* Implements hook_entity_access().
*/
function media_entity_access(EntityInterface $entity, $operation, AccountInterface $account) {