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

Breadcrumb

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

function StatusMessages::getInfo

Generate the placeholder in a #pre_render callback, because the hash salt needs to be accessed, which may not yet be available when this is called.

Overrides ElementInterface::getInfo

File

core/lib/Drupal/Core/Render/Element/StatusMessages.php, line 28

Class

StatusMessages
Provides a messages element.

Namespace

Drupal\Core\Render\Element

Code

public function getInfo() {
    return [
        // May have a value of 'status' or 'error' when only displaying messages
        // of that specific type.
'#display' => NULL,
        '#pre_render' => [
            static::class . '::generatePlaceholder',
        ],
        '#include_fallback' => FALSE,
    ];
}

API Navigation

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