Skip to main content
Drupal API
User account menu
  • Log in

Breadcrumb

  1. Drupal Core 11.1.x
  2. ClaroPreRender.php

function ClaroPreRender::messagePlaceholder

Prerender callback for status_messages placeholder.

Parameters

array $element: A renderable array.

Return value

array The updated renderable array containing the placeholder.

File

core/themes/claro/src/ClaroPreRender.php, line 185

Class

ClaroPreRender
Implements trusted prerender callbacks for the Claro theme.

Namespace

Drupal\claro

Code

public static function messagePlaceholder(array $element) {
    if (isset($element['fallback']['#markup'])) {
        $element['fallback']['#markup'] = '<div data-drupal-messages-fallback class="hidden messages-list"></div>';
    }
    return $element;
}

API Navigation

  • Drupal Core 11.1.x
  • Topics
  • Classes
  • Functions
  • Constants
  • Globals
  • Files
  • Namespaces
  • Deprecated
  • Services
RSS feed
Powered by Drupal