RenderCallbacks.php

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

Namespace

Drupal\announcements_feed

File

core/modules/announcements_feed/src/RenderCallbacks.php

View source
<?php

declare (strict_types=1);
namespace Drupal\announcements_feed;

use Drupal\Core\Security\TrustedCallbackInterface;

/**
 * Defines a class for render callbacks.
 *
 * @internal
 */
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',
        ];
    }

}

Classes

Title Deprecated Summary
RenderCallbacks Defines a class for render callbacks.

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