public function Ajax::getInfo

public Ajax::getInfo()

Returns the element properties for this element.

Return value

array An array of element properties. See \Drupal\Core\Render\ElementInfoManagerInterface::getInfo() for documentation of the standard properties of all elements, and the return value format.

Overrides ElementInterface::getInfo

File

core/lib/Drupal/Core/Render/Element/Ajax.php, line 19

Class

Ajax
Provides a render element for adding Ajax to a render element.

Namespace

Drupal\Core\Render\Element

Code

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 array(
    '#header' => TRUE,
    '#commands' => array(),
    '#error' => NULL,
  );
}

© 2001–2016 by the original authors
Licensed under the GNU General Public License, version 2 and later.
Drupal is a registered trademark of Dries Buytaert.
https://api.drupal.org/api/drupal/core!lib!Drupal!Core!Render!Element!Ajax.php/function/Ajax::getInfo/8.1.x