public function FormComponentTypeBase::getFormEntityManager in Flexiform 8
Get the form entity manager.
Return value
\Drupal\flexiform\FormEntity\FlexiformFormEntityManager The form entity manager.
Overrides FormComponentTypeInterface::getFormEntityManager
1 call to FormComponentTypeBase::getFormEntityManager()
- FormComponentTypeBase::buildComponentRow in src/
FormComponent/ FormComponentTypeBase.php - Build a component row for a component of this type.
File
- src/
FormComponent/ FormComponentTypeBase.php, line 61
Class
- FormComponentTypeBase
- Base class for form component types.
Namespace
Drupal\flexiform\FormComponentCode
public function getFormEntityManager($form = [], FormStateInterface $form_state = NULL) {
if (empty($this->formEntityManager)) {
if (!isset($form_state)) {
throw new \Exception('No form entity manager set AND no form state provided');
}
$this->formEntityManager = $this
->getFormDisplay()
->getFormEntityManager(MultipleEntityFormState::createForForm($form, $form_state));
}
return $this->formEntityManager;
}