Fieldset.php
Same filename in other branches
Namespace
Drupal\Core\Render\ElementFile
-
core/
lib/ Drupal/ Core/ Render/ Element/ Fieldset.php
View source
<?php
namespace Drupal\Core\Render\Element;
/**
* Provides a render element for a group of form elements.
*
* Usage example:
* @code
* $form['author'] = array(
* '#type' => 'fieldset',
* '#title' => $this->t('Author'),
* );
*
* $form['author']['name'] = array(
* '#type' => 'textfield',
* '#title' => $this->t('Name'),
* );
* @endcode
*
* @see \Drupal\Core\Render\Element\Fieldgroup
* @see \Drupal\Core\Render\Element\Details
*
* @RenderElement("fieldset")
*/
class Fieldset extends RenderElement {
/**
* {@inheritdoc}
*/
public function getInfo() {
$class = get_class($this);
return [
'#process' => [
[
$class,
'processGroup',
],
[
$class,
'processAjaxForm',
],
],
'#pre_render' => [
[
$class,
'preRenderGroup',
],
],
'#value' => NULL,
'#theme_wrappers' => [
'fieldset',
],
];
}
}
Classes
Title | Deprecated | Summary |
---|---|---|
Fieldset | Provides a render element for a group of form elements. |
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.