diff --git a/core/modules/views/src/Plugin/views/field/EntityLink.php b/core/modules/views/src/Plugin/views/field/EntityLink.php index cbc9cc4..7a93071 100644 --- a/core/modules/views/src/Plugin/views/field/EntityLink.php +++ b/core/modules/views/src/Plugin/views/field/EntityLink.php @@ -27,9 +27,6 @@ class EntityLink extends FieldPluginBase { */ public function init(ViewExecutable $view, DisplayPluginBase $display, array &$options = NULL) { parent::init($view, $display, $options); - - // @FIXME - // $this->additional_fields['langcode'] = ['table' => 'node_field_data', 'field' => 'langcode']; } /** @@ -109,7 +106,7 @@ protected function renderLink(EntityInterface $entity, ResultRow $values) { protected function addLangcode(ResultRow $values) { if (isset($this->aliases['langcode'])) { $languages = language_list(); - $langcode = $this->getValue($values, 'langcode'); + $langcode = $this->getEntity($values, 'langcode'); if (isset($languages[$langcode])) { $this->options['alter']['language'] = $languages[$langcode]; } diff --git a/core/modules/views/src/Plugin/views/field/EntityLinkDelete.php b/core/modules/views/src/Plugin/views/field/EntityLinkDelete.php index 8245714..3e3a94a 100644 --- a/core/modules/views/src/Plugin/views/field/EntityLinkDelete.php +++ b/core/modules/views/src/Plugin/views/field/EntityLinkDelete.php @@ -7,6 +7,7 @@ namespace Drupal\views\Plugin\views\field; +use Drupal\Core\Entity\EntityInterface; use Drupal\views\ResultRow; /** @@ -21,7 +22,7 @@ class EntityLinkDelete extends EntityLink { /** * {@inheritdoc} */ - protected function renderLink($entity, ResultRow $values) { + protected function renderLink(EntityInterface $entity, ResultRow $values) { // Ensure user has access to delete this node. if ($entity && $entity->access('delete')) { $this->options['alter']['make_link'] = TRUE;