You are here

public function WebformSection::getInfo in Webform 8.5

Same name and namespace in other branches
  1. 6.x src/Element/WebformSection.php \Drupal\webform\Element\WebformSection::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

src/Element/WebformSection.php, line 17

Class

WebformSection
Provides a render element for a section/group of form elements.

Namespace

Drupal\webform\Element

Code

public function getInfo() {
  $class = get_class($this);
  return [
    '#process' => [
      [
        $class,
        'processGroup',
      ],
      [
        $class,
        'processAjaxForm',
      ],
    ],
    '#pre_render' => [
      [
        $class,
        'preRenderGroup',
      ],
    ],
    '#value' => NULL,
    '#title_tag' => 'h2',
    // Must set default description display to before to prevent it from being
    // set to after.
    // @see \Drupal\Core\Form\FormBuilder::doBuildForm
    '#description_display' => 'before',
    '#theme_wrappers' => [
      'webform_section',
    ],
  ];
}