public function YamlFormElementManager::getElementInstance in YAML Form 8
Get a form element plugin instance for an element.
Parameters
array $element: An associative array containing an element with a #type property.
Return value
\Drupal\yamlform\YamlFormElementInterface A form element plugin instance
Overrides YamlFormElementManagerInterface::getElementInstance
File
- src/
YamlFormElementManager.php, line 132
Class
- YamlFormElementManager
- Provides a plugin manager for form element plugins.
Namespace
Drupal\yamlformCode
public function getElementInstance(array $element) {
$plugin_id = $this
->getElementPluginId($element);
return $this
->createInstance($plugin_id, $element);
}