|
|
@ -128,6 +128,9 @@ class ConfirmDeleteMediaAndFile extends DeleteMultipleForm { |
|
|
|
// Check for files. |
|
|
|
// Check for files. |
|
|
|
$fields = $this->entityFieldManager->getFieldDefinitions('media', $entity->bundle()); |
|
|
|
$fields = $this->entityFieldManager->getFieldDefinitions('media', $entity->bundle()); |
|
|
|
foreach ($fields as $field) { |
|
|
|
foreach ($fields as $field) { |
|
|
|
|
|
|
|
if ($field->getName() == 'thumbnail') { |
|
|
|
|
|
|
|
continue; |
|
|
|
|
|
|
|
} |
|
|
|
$type = $field->getType(); |
|
|
|
$type = $field->getType(); |
|
|
|
if ($type == 'file' || $type == 'image') { |
|
|
|
if ($type == 'file' || $type == 'image') { |
|
|
|
$target_id = $entity->get($field->getName())->target_id; |
|
|
|
$target_id = $entity->get($field->getName())->target_id; |
|
|
|