Commit 5fe45605 authored by slashrsm's avatar slashrsm Committed by slashrsm

Issue #2812995 by slashrsm, Berdi: Wrapping label in TranslatableMarkup() is...

Issue #2812995 by slashrsm, Berdi: Wrapping label in TranslatableMarkup() is not needed in ViewModeDeriver::getDerivativeDefinitions()
parent 8b6210aa
......@@ -6,7 +6,6 @@ use Drupal\Component\Plugin\Derivative\DeriverBase;
use Drupal\Core\Config\ConfigFactoryInterface;
use Drupal\Core\Entity\EntityDisplayRepositoryInterface;
use Drupal\Core\Plugin\Discovery\ContainerDeriverInterface;
use Drupal\Core\StringTranslation\TranslatableMarkup;
use Symfony\Component\DependencyInjection\ContainerInterface;
/**
......@@ -61,7 +60,7 @@ class ViewModeDeriver extends DeriverBase implements ContainerDeriverInterface {
foreach ($this->entityDisplayRepository->getAllViewModes() as $view_modes) {
foreach ($view_modes as $view_mode => $definition) {
$this->derivatives[$definition['id']] = $base_plugin_definition;
$this->derivatives[$definition['id']]['label'] = new TranslatableMarkup($definition['label']);
$this->derivatives[$definition['id']]['label'] = $definition['label'];
$this->derivatives[$definition['id']]['view_mode'] = $view_mode;
$this->derivatives[$definition['id']]['entity_types'] = $definition['targetEntityType'];
$this->derivatives[$definition['id']]['no_ui'] = $mode;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment