Version 1
[yaffs-website] / web / core / lib / Drupal / Core / Render / Element / Ajax.php
1 <?php
2
3 namespace Drupal\Core\Render\Element;
4
5 /**
6  * Provides a render element for adding Ajax to a render element.
7  *
8  * Holds an array whose values control the Ajax behavior of the element.
9  *
10  * @ingroup ajax
11  *
12  * @RenderElement("ajax")
13  */
14 class Ajax extends RenderElement {
15
16   /**
17    * {@inheritdoc}
18    */
19   public function getInfo() {
20     // By default, we don't want Ajax commands being rendered in the context of
21     // an HTML page, so we don't provide defaults for #theme or #theme_wrappers.
22     // However, modules can set these properties (for example, to provide an
23     // HTML debugging page that displays rather than executes Ajax commands).
24     return [
25       '#header' => TRUE,
26       '#commands' => [],
27       '#error' => NULL,
28     ];
29   }
30
31 }