From 0ae6b862e5a04d06ff1137ecd3f4279c4cd29ad8 Mon Sep 17 00:00:00 2001 From: Sergii Pavlenko Date: Tue, 10 Sep 2024 14:59:53 +0300 Subject: [PATCH] EWPP-4704: Remove override of method getMetadata() for List Page content type. --- .../ListPageContentType.php | 30 ------------------- 1 file changed, 30 deletions(-) diff --git a/modules/oe_theme_list_pages/src/Plugin/PageHeaderMetadata/ListPageContentType.php b/modules/oe_theme_list_pages/src/Plugin/PageHeaderMetadata/ListPageContentType.php index b7b5f382f..6247bc953 100644 --- a/modules/oe_theme_list_pages/src/Plugin/PageHeaderMetadata/ListPageContentType.php +++ b/modules/oe_theme_list_pages/src/Plugin/PageHeaderMetadata/ListPageContentType.php @@ -26,34 +26,4 @@ public function applies(): bool { return $node && $node->bundle() === 'oe_list_page'; } - /** - * {@inheritdoc} - */ - public function getMetadata(): array { - $metadata = parent::getMetadata(); - - $node = $this->getNode(); - if ($node->get('oe_summary')->isEmpty()) { - return $metadata; - } - - $summary = $node->get('oe_summary')->first(); - $metadata['introduction'] = [ - // We strip the tags because the component expects only one paragraph of - // text and the field is using a text format which adds paragraph tags. - '#type' => 'inline_template', - '#template' => '{{ summary|render|striptags("")|raw }}', - '#context' => [ - 'summary' => [ - '#type' => 'processed_text', - '#text' => $summary->value, - '#format' => $summary->format, - '#langcode' => $summary->getLangcode(), - ], - ], - ]; - - return $metadata; - } - }