public function WebformElementManagerInterface::getElementInstance in Webform 8.5
Same name and namespace in other branches
- 6.x src/Plugin/WebformElementManagerInterface.php \Drupal\webform\Plugin\WebformElementManagerInterface::getElementInstance()
Get a webform element plugin instance for an element.
Parameters
array $element: An associative array containing an element with a #type property.
\Drupal\webform\WebformInterface|\Drupal\webform\WebformSubmissionInterface $entity: A webform or webform submission entity.
Return value
\Drupal\webform\Plugin\WebformElementInterface A webform element plugin instance
Throws
\Exception Throw exception if entity type is not a webform or webform submission.
1 method overrides WebformElementManagerInterface::getElementInstance()
- WebformElementManager::getElementInstance in src/
Plugin/ WebformElementManager.php - Get a webform element plugin instance for an element.
File
- src/
Plugin/ WebformElementManagerInterface.php, line 127
Class
- WebformElementManagerInterface
- Collects available webform elements.
Namespace
Drupal\webform\PluginCode
public function getElementInstance(array $element, EntityInterface $entity = NULL);