Skip to content
Snippets Groups Projects
Commit 6529caaf authored by Roderik Muit's avatar Roderik Muit
Browse files

Issue #3483450 by roderik: Remove bogus $key parameter from generate() calls

parent 99c27dc5
No related branches found
No related tags found
No related merge requests found
Pipeline #323951 passed with warnings
......@@ -39,7 +39,7 @@ class MediaReferenceFieldItemProcessor implements CustomElementProcessorWithKeyI
/** @var \Drupal\media\MediaInterface $media_entity */
$media_entity = $field_item->entity;
if ($this->entityIsAccessible($media_entity, $element)) {
$media_element = $this->getCustomElementGenerator()->generate($media_entity, $viewMode, $key);
$media_element = $this->getCustomElementGenerator()->generate($media_entity, $viewMode);
// Set element content from media element to avoid a wrapper tag.
$element->setFromCustomElement($media_element);
}
......
......@@ -39,7 +39,7 @@ class ParagraphFieldItemProcessor implements CustomElementProcessorWithKeyInterf
/** @var \Drupal\paragraphs\ParagraphInterface $paragraph */
$paragraph = $field_item->entity;
if ($this->entityIsAccessible($paragraph, $element)) {
$paragraph_element = $this->getCustomElementGenerator()->generate($paragraph, $viewMode, $key);
$paragraph_element = $this->getCustomElementGenerator()->generate($paragraph, $viewMode);
// Set content without wrapping tag.
$element->setFromCustomElement($paragraph_element);
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment