ReferenceEntityFormBuilder.php in Bibliography & Citation 8
File
modules/bibcite_entity/src/ReferenceEntityFormBuilder.php
View source
<?php
namespace Drupal\bibcite_entity;
use Drupal\Core\Entity\EntityFormBuilder;
use Drupal\Core\Entity\EntityInterface;
use Drupal\Core\Form\FormState;
class ReferenceEntityFormBuilder extends EntityFormBuilder {
protected $formBuilder;
public function getForm(EntityInterface $entity, $operation = 'default', array $form_state_additions = []) {
if ($data = $this->formBuilder
->restoreFromCache()) {
$entity = $data;
}
return parent::getForm($entity, $operation, $form_state_additions);
}
}