diff --git a/core/lib/Drupal/Core/Render/Element/SystemCompactLink.php b/core/lib/Drupal/Core/Render/Element/SystemCompactLink.php index 6b16e0a..4f985a2 100644 --- a/core/lib/Drupal/Core/Render/Element/SystemCompactLink.php +++ b/core/lib/Drupal/Core/Render/Element/SystemCompactLink.php @@ -63,7 +63,7 @@ public static function preRenderCompactLink($element) { $element['#url'] = BaseUrl::fromRoute('system.admin_compact_page', array('mode' => 'off')); $element['#options'] = array( 'attributes' => array('title' => t('Expand layout to include descriptions.')), - 'query' => $this->getDestination(), + 'query' => \Drupal::destination() ); } else { @@ -71,7 +71,7 @@ public static function preRenderCompactLink($element) { $element['#url'] = BaseUrl::fromRoute('system.admin_compact_page', array('mode' => 'on')); $element['#options'] = array( 'attributes' => array('title' => t('Compress layout by hiding descriptions.')), - 'query' => $this->getDestination(), + 'query' => \Drupal::destination(), ); } diff --git a/core/lib/Drupal/Core/Routing/RedirectDestinationTrait.php b/core/lib/Drupal/Core/Routing/RedirectDestinationTrait.php index f6f7f41..6810669 100644 --- a/core/lib/Drupal/Core/Routing/RedirectDestinationTrait.php +++ b/core/lib/Drupal/Core/Routing/RedirectDestinationTrait.php @@ -62,7 +62,7 @@ protected function getRedirectDestination() { * Sets the redirect destination service. * * @param \Drupal\Core\Routing\RedirectDestinationInterface $redirect_destination - * The link generator service. + * The redirect destination service. * * @return $this */ diff --git a/core/modules/book/src/Form/BookAdminEditForm.php b/core/modules/book/src/Form/BookAdminEditForm.php index f49d4a4..2778ae9 100644 --- a/core/modules/book/src/Form/BookAdminEditForm.php +++ b/core/modules/book/src/Form/BookAdminEditForm.php @@ -24,8 +24,6 @@ */ class BookAdminEditForm extends FormBase { - use RedirectDestinationTrait; - /** * The node storage. * diff --git a/core/modules/comment/src/Plugin/views/field/LinkDelete.php b/core/modules/comment/src/Plugin/views/field/LinkDelete.php index 88809bb..c37644c 100644 --- a/core/modules/comment/src/Plugin/views/field/LinkDelete.php +++ b/core/modules/comment/src/Plugin/views/field/LinkDelete.php @@ -19,7 +19,6 @@ */ class LinkDelete extends Link { - /** * {@inheritdoc} */ diff --git a/core/modules/comment/src/Plugin/views/field/LinkEdit.php b/core/modules/comment/src/Plugin/views/field/LinkEdit.php index d4d6b1c..c70024e 100644 --- a/core/modules/comment/src/Plugin/views/field/LinkEdit.php +++ b/core/modules/comment/src/Plugin/views/field/LinkEdit.php @@ -19,7 +19,6 @@ */ class LinkEdit extends Link { - protected function defineOptions() { $options = parent::defineOptions(); $options['destination'] = array('default' => FALSE); diff --git a/core/modules/node/src/Plugin/views/field/Link.php b/core/modules/node/src/Plugin/views/field/Link.php index 54b51ae..a0d7ba7 100644 --- a/core/modules/node/src/Plugin/views/field/Link.php +++ b/core/modules/node/src/Plugin/views/field/Link.php @@ -8,6 +8,7 @@ namespace Drupal\node\Plugin\views\field; use Drupal\Core\Form\FormStateInterface; +use Drupal\Core\Routing\RedirectDestinationTrait; use Drupal\views\Plugin\views\field\FieldPluginBase; use Drupal\views\ResultRow; @@ -20,6 +21,8 @@ */ class Link extends FieldPluginBase { + use RedirectDestinationTrait; + /** * {@inheritdoc} */ diff --git a/core/modules/node/src/Plugin/views/field/LinkDelete.php b/core/modules/node/src/Plugin/views/field/LinkDelete.php index dfb8abb..16d32a8 100644 --- a/core/modules/node/src/Plugin/views/field/LinkDelete.php +++ b/core/modules/node/src/Plugin/views/field/LinkDelete.php @@ -7,7 +7,6 @@ namespace Drupal\node\Plugin\views\field; -use Drupal\Core\Routing\RedirectDestinationTrait; use Drupal\node\Plugin\views\field\Link; use Drupal\views\ResultRow; @@ -20,8 +19,6 @@ */ class LinkDelete extends Link { - use RedirectDestinationTrait; - /** * Prepares the link to delete a node. * diff --git a/core/modules/node/src/Plugin/views/field/LinkEdit.php b/core/modules/node/src/Plugin/views/field/LinkEdit.php index e8007e1..364c82b 100644 --- a/core/modules/node/src/Plugin/views/field/LinkEdit.php +++ b/core/modules/node/src/Plugin/views/field/LinkEdit.php @@ -7,7 +7,6 @@ namespace Drupal\node\Plugin\views\field; -use Drupal\Core\Routing\RedirectDestinationTrait; use Drupal\Core\Url; use Drupal\node\Plugin\views\field\Link; use Drupal\views\ResultRow; @@ -21,8 +20,6 @@ */ class LinkEdit extends Link { - use RedirectDestinationTrait; - /** * Prepares the link to the node. * diff --git a/core/modules/node/src/Plugin/views/field/RevisionLink.php b/core/modules/node/src/Plugin/views/field/RevisionLink.php index c354694..2cb336f 100644 --- a/core/modules/node/src/Plugin/views/field/RevisionLink.php +++ b/core/modules/node/src/Plugin/views/field/RevisionLink.php @@ -24,8 +24,6 @@ */ class RevisionLink extends Link { - use RedirectDestinationTrait; - /** * Overrides Drupal\views\Plugin\views\field\FieldPluginBase::init(). */