Closed stooit closed 5 years ago
When using an image processor as follows:
- processor: media data_embed_button: media_entity_embed data_entity_embed_display: 'view_mode:media.embed'
The options are added to attributes in src/Processor/Media.php, but these do not flow through to MediaTrait.
src/Processor/Media.php
Also there is a bug in Media.php:
Media.php
diff --git a/src/Processor/Media.php b/src/Processor/Media.php index ee6fbb3..a91e0f1 100644 --- a/src/Processor/Media.php +++ b/src/Processor/Media.php @@ -51,7 +51,7 @@ class Media extends ProcessorOutputBase implements ProcessorInterface $this->config['attributes'] = []; $this->config['attributes']['data_embed_button'] = !empty($config['data_embed_button']) ? $config['data_embed_button'] : 'tide_media'; - $this->config['attributes']['data_entity_embed_display'] = !empty($config['data_entity_embed_display']) ? $config['data_embed_button'] : 'view_mode:media.embedded'; + $this->config['attributes']['data_entity_embed_display'] = !empty($config['data_entity_embed_display']) ? $config['data_entity_embed_display'] : 'view_mode:media.embedded'; $this->config['attributes']['data_entity_type'] = !empty($config['data_entity_type']) ? $config['data_entity_type'] : 'media';
When using an image processor as follows:
The options are added to attributes in
src/Processor/Media.php
, but these do not flow through to MediaTrait.Also there is a bug in
Media.php
: