You are here

public function Loader::getElement in Form Builder 7.2

Get element instance.

File

src/Loader.php, line 178

Class

Loader
This class is a wrapper around all the hooks used for getting pluigns.

Namespace

Drupal\form_builder

Code

public function getElement($form_type, $form_id, $element_type, $form, &$element) {
  $infos = $this
    ->getElementTypeInfo($form_type, $form_id);
  $info = $infos[$element_type];
  $class = $info['class'];
  return new $class($form, $info, $element, $this);
}