You are here

class Element in Form Builder 7.2

Same name in this branch
  1. 7.2 examples/src/Element.php \Drupal\form_builder_examples\Element
  2. 7.2 modules/webform/src/Element.php \Drupal\form_builder_webform\Element

Form builder element for the example form type.

Hierarchy

Expanded class hierarchy of Element

1 file declares its use of Element
form_builder_examples.module in examples/form_builder_examples.module
form_builder_examples.module Sample implementations of form_builder.

File

examples/src/Element.php, line 10

Namespace

Drupal\form_builder_examples
View source
class Element extends ElementBase {

  /**
   * {@inheritdoc}
   */
  public function configurationForm($form, &$form_state) {
    $form['#_edit_element'] = $this->element;
    foreach ($this
      ->getProperties() as $property) {
      $form = array_merge($form, $property
        ->form($form_state, $this));
    }
    return $form;
  }

}

Members

Namesort descending Modifiers Type Description Overrides
Element::configurationForm public function Get the configuration form for this element. Overrides ElementInterface::configurationForm
ElementBase::$element protected property
ElementBase::$form protected property
ElementBase::$loader protected property
ElementBase::$params protected property
ElementBase::addPreRender protected function Add our pre-render function to the element-array.
ElementBase::configurationSubmit public function Submit handler for the configuration form. Overrides ElementInterface::configurationSubmit 1
ElementBase::getProperties public function Get a list of properties available for this element. Overrides ElementInterface::getProperties
ElementBase::getSaveableProperties public function Get a list of properties that are supported in any way by this element. Overrides ElementInterface::getSaveableProperties
ElementBase::key public function 1
ElementBase::parentId public function
ElementBase::render public function (Re-)Render an element. Overrides ElementInterface::render 1
ElementBase::setProperty protected function Set the value of a property. 1
ElementBase::title public function Get a human-readable title for this form element. Overrides ElementInterface::title 1
ElementBase::__construct public function Overrides ElementInterface::__construct