class RenderCallbacks

Same name in this branch
  1. 11.x core/modules/navigation/src/RenderCallbacks.php \Drupal\navigation\RenderCallbacks
  2. 11.x core/modules/announcements_feed/src/RenderCallbacks.php \Drupal\announcements_feed\RenderCallbacks
Same name and namespace in other branches
  1. 10 core/modules/navigation/src/RenderCallbacks.php \Drupal\navigation\RenderCallbacks
  2. 10 core/modules/announcements_feed/src/RenderCallbacks.php \Drupal\announcements_feed\RenderCallbacks
  3. main core/modules/navigation/src/RenderCallbacks.php \Drupal\navigation\RenderCallbacks
  4. main core/modules/announcements_feed/src/RenderCallbacks.php \Drupal\announcements_feed\RenderCallbacks

Defines a class for render callbacks.

@internal

Hierarchy

Expanded class hierarchy of RenderCallbacks

1 file declares its use of RenderCallbacks
ToolbarHooks.php in core/modules/toolbar/src/Hook/ToolbarHooks.php

File

core/modules/toolbar/src/RenderCallbacks.php, line 14

Namespace

Drupal\toolbar
View source
final class RenderCallbacks implements TrustedCallbackInterface {
  
  /**
   * Render callback.
   */
  public static function removeTabAttributes(array $element) : array {
    unset($element['tab']['#attributes']);
    return $element;
  }
  
  /**
   * {@inheritdoc}
   */
  public static function trustedCallbacks() : array {
    return [
      'removeTabAttributes',
    ];
  }

}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.