class RenderCallbacks

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

Defines a class for render callbacks.

@internal

Hierarchy

Expanded class hierarchy of RenderCallbacks

1 file declares its use of RenderCallbacks
announcements_feed.module in core/modules/announcements_feed/announcements_feed.module
Fetch community announcements from www.drupal.org feed.

File

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

Namespace

Drupal\announcements_feed
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',
        ];
    }

}

Members

Title Sort descending Modifiers Object type Summary Overriden Title
RenderCallbacks::removeTabAttributes public static function Render callback.
RenderCallbacks::trustedCallbacks public static function Lists the trusted callbacks provided by the implementing class. Overrides TrustedCallbackInterface::trustedCallbacks
TrustedCallbackInterface::THROW_EXCEPTION constant Untrusted callbacks throw exceptions.
TrustedCallbackInterface::TRIGGER_SILENCED_DEPRECATION constant Untrusted callbacks trigger silenced E_USER_DEPRECATION errors.

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