diff --git a/core/modules/comment/src/Plugin/views/field/Link.php b/core/modules/comment/src/Plugin/views/field/Link.php index a06c00a..377ab4a 100644 --- a/core/modules/comment/src/Plugin/views/field/Link.php +++ b/core/modules/comment/src/Plugin/views/field/Link.php @@ -37,7 +37,6 @@ class Link extends FieldPluginBase { * * @var \Drupal\Core\Routing\RedirectDestinationInterface */ - protected $redirectDestination; /** diff --git a/core/modules/contextual/src/Plugin/views/field/ContextualLinks.php b/core/modules/contextual/src/Plugin/views/field/ContextualLinks.php index a025827..e67b4a3 100644 --- a/core/modules/contextual/src/Plugin/views/field/ContextualLinks.php +++ b/core/modules/contextual/src/Plugin/views/field/ContextualLinks.php @@ -30,7 +30,6 @@ class ContextualLinks extends FieldPluginBase { * * @var \Drupal\Core\Routing\RedirectDestinationInterface */ - protected $redirectDestination; /** diff --git a/core/modules/user/src/Plugin/views/field/Link.php b/core/modules/user/src/Plugin/views/field/Link.php index ca3a7bf..767dbf5 100644 --- a/core/modules/user/src/Plugin/views/field/Link.php +++ b/core/modules/user/src/Plugin/views/field/Link.php @@ -30,7 +30,6 @@ class Link extends FieldPluginBase { * * @var \Drupal\Core\Routing\RedirectDestinationInterface */ - protected $redirectDestination; /** diff --git a/core/modules/views/src/Plugin/views/field/Links.php b/core/modules/views/src/Plugin/views/field/Links.php index bff3f0a..d5cabbe 100644 --- a/core/modules/views/src/Plugin/views/field/Links.php +++ b/core/modules/views/src/Plugin/views/field/Links.php @@ -9,7 +9,6 @@ use Drupal\Component\Utility\String; use Drupal\Core\Form\FormStateInterface; -use Drupal\Core\Routing\RedirectDestinationInterface; use Drupal\Core\Url as UrlObject; /** @@ -19,43 +18,6 @@ */ abstract class Links extends FieldPluginBase { - /** - * The redirect destination service. - * - * @var \Drupal\Core\Routing\RedirectDestinationInterface - */ - - protected $redirectDestination; - - /** - * {@inheritdoc} - */ - public static function create(ContainerInterface $container, array $configuration, $plugin_id, $plugin_definition) { - return new static( - $configuration, - $plugin_id, - $plugin_definition, - $container->get('redirect.destination') - ); - } - - /** - * Constructs a Link field plugin. - * - * @param array $configuration - * A configuration array containing information about the plugin instance. - * @param string $plugin_id - * The plugin_id for the plugin instance. - * @param mixed $plugin_definition - * The plugin implementation definition. - * @param \Drupal\Core\Routing\RedirectDestinationInterface $redirect_destination - * The redirect destination service. - */ - public function __construct(array $configuration, $plugin_id, $plugin_definition, RedirectDestinationInterface $redirect_destination) { - parent::__construct($configuration, $plugin_id, $plugin_definition); - $this->redirectDestination = $redirect_destination; - } - /** * {@inheritdoc} */ @@ -127,7 +89,7 @@ protected function getLinks() { 'title' => $title, ); if (!empty($this->options['destination'])) { - $links[$field]['query'] = $this->redirectDestination->getAsArray(); + $links[$field]['query'] = \Drupal::destination()->getAsArray(); } }