Skip to content
Snippets Groups Projects

Improve processors to support an optional key argument

Closed Wolfgang Ziegler requested to merge 3443794-process-optional-name-arg-with-key into 3.x
17 files
+ 86
77
Compare changes
  • Side-by-side
  • Inline
Files
17
@@ -29,7 +29,7 @@ class ParagraphGalleryProcessor implements CustomElementProcessorInterface {
/**
* {@inheritdoc}
*/
public function addtoElement($paragraph, CustomElement $element, $viewMode) {
public function addtoElement($paragraph, CustomElement $element, $viewMode, $key = '') {
assert($paragraph instanceof ParagraphInterface);
if ($this->fieldIsAccessible($paragraph, 'field_media', $element)) {
/** @var \Drupal\media\Entity\Media $media_entity */
Loading