Loading src/Plugin/EntityTabContent/EntityForm.php +12 −1 Original line number Diff line number Diff line Loading @@ -120,7 +120,18 @@ class EntityForm extends EntityTabContentBase implements ContainerFactoryPluginI * {@inheritdoc} */ public function buildContent(EntityInterface $target_entity) { return $this->entityFormBuilder->getForm($target_entity, $this->configuration['form_mode']); $entity_type = $target_entity->getEntityType(); $operation = $this->configuration['form_mode']; if ($entity_type->getFormClass($operation) === NULL) { // Hotpatch in the default handler for the given form mode as a workaround // for a core bug. // @see https://www.drupal.org/project/drupal/issues/2530086. // @todo: remove once the core issue is fixed. $entity_type->setFormClass($operation, $entity_type->getFormClass('default')); } return $this->entityFormBuilder->getForm($target_entity, $operation); } } Loading
src/Plugin/EntityTabContent/EntityForm.php +12 −1 Original line number Diff line number Diff line Loading @@ -120,7 +120,18 @@ class EntityForm extends EntityTabContentBase implements ContainerFactoryPluginI * {@inheritdoc} */ public function buildContent(EntityInterface $target_entity) { return $this->entityFormBuilder->getForm($target_entity, $this->configuration['form_mode']); $entity_type = $target_entity->getEntityType(); $operation = $this->configuration['form_mode']; if ($entity_type->getFormClass($operation) === NULL) { // Hotpatch in the default handler for the given form mode as a workaround // for a core bug. // @see https://www.drupal.org/project/drupal/issues/2530086. // @todo: remove once the core issue is fixed. $entity_type->setFormClass($operation, $entity_type->getFormClass('default')); } return $this->entityFormBuilder->getForm($target_entity, $operation); } }