Creates a new form controller instance.
string $entity_type: The entity type for this form controller.
string $operation: The name of the operation to use, e.g., 'default'.
\Drupal\Core\Entity\EntityFormControllerInterface A form controller instance.
public function getFormController($entity_type, $operation) {
if (!isset($this->controllers['form'][$operation][$entity_type])) {
$class = $this
->getControllerClass($entity_type, 'form', $operation);
if (in_array('Drupal\\Core\\Entity\\EntityControllerInterface', class_implements($class))) {
$this->controllers['form'][$operation][$entity_type] = $class::createInstance($this->container, $entity_type, $this
->getDefinition($entity_type));
$this->controllers['form'][$operation][$entity_type]
->setOperation($operation);
}
else {
$this->controllers['form'][$operation][$entity_type] = new $class($operation);
}
}
return $this->controllers['form'][$operation][$entity_type];
}