1. 8.5.x core/lib/Drupal/Core/Render/Element/Ajax.php
  2. 8.0.x core/lib/Drupal/Core/Render/Element/Ajax.php
  3. 8.1.x core/lib/Drupal/Core/Render/Element/Ajax.php
  4. 8.2.x core/lib/Drupal/Core/Render/Element/Ajax.php
  5. 8.3.x core/lib/Drupal/Core/Render/Element/Ajax.php
  6. 8.4.x core/lib/Drupal/Core/Render/Element/Ajax.php
  7. 8.6.x core/lib/Drupal/Core/Render/Element/Ajax.php

Namespace

Drupal\Core\Render\Element

File

core/lib/Drupal/Core/Render/Element/Ajax.php
View source
<?php

namespace Drupal\Core\Render\Element;


/**
 * Provides a render element for adding Ajax to a render element.
 *
 * Holds an array whose values control the Ajax behavior of the element.
 *
 * @ingroup ajax
 *
 * @RenderElement("ajax")
 */
class Ajax extends RenderElement {

  /**
   * {@inheritdoc}
   */
  public function getInfo() {

    // By default, we don't want Ajax commands being rendered in the context of
    // an HTML page, so we don't provide defaults for #theme or #theme_wrappers.
    // However, modules can set these properties (for example, to provide an
    // HTML debugging page that displays rather than executes Ajax commands).
    return [
      '#header' => TRUE,
      '#commands' => [],
      '#error' => NULL,
    ];
  }

}

Classes

Namesort descending Description
Ajax Provides a render element for adding Ajax to a render element.