Commit 31d5ad24 authored by catch's avatar catch
Browse files

task: #3559573 Replace TrustedCallbackInterface with TrustedCallback attribute...

task: #3559573 Replace TrustedCallbackInterface with TrustedCallback attribute in Drupal\navigation\ShortcutLazyBuilder

By: plopesc
By: aryan singh
(cherry picked from commit be9f48f6ed5098a88b6a5bb58ce940f874b9a871)
parent be07eed9
Loading
Loading
Loading
Loading
Loading
+3 −9
Original line number Diff line number Diff line
@@ -4,7 +4,7 @@

namespace Drupal\navigation;

use Drupal\Core\Security\TrustedCallbackInterface;
use Drupal\Core\Security\Attribute\TrustedCallback;
use Drupal\shortcut\ShortcutLazyBuilders;

/**
@@ -13,7 +13,7 @@
 * @internal
 * @see \Drupal\shortcut\ShortcutLazyBuilders
 */
final class ShortcutLazyBuilder implements TrustedCallbackInterface {
final class ShortcutLazyBuilder {

  /**
   * Constructs a ShortcutLazyBuilders object.
@@ -25,13 +25,6 @@ public function __construct(
    protected readonly ShortcutLazyBuilders $shortcutLazyBuilder,
  ) {}

  /**
   * {@inheritdoc}
   */
  public static function trustedCallbacks() {
    return ['lazyLinks'];
  }

  /**
   * The #lazy_builder callback; builds shortcut navigation links.
   *
@@ -41,6 +34,7 @@ public static function trustedCallbacks() {
   * @return array
   *   A renderable array of shortcut links.
   */
  #[TrustedCallback]
  public function lazyLinks(string $label = 'Shortcuts') {
    $shortcut_links = $this->shortcutLazyBuilder->lazyLinks();