use Drupal\Core\Form\FormStateInterface;
use Drupal\Core\Render\Element;
use Drupal\Core\Entity\Entity\EntityFormDisplay;
-use Drupal\user\PrivateTempStoreFactory;
+use Drupal\Core\TempStore\PrivateTempStoreFactory;
use Symfony\Component\DependencyInjection\ContainerInterface;
use Symfony\Component\Validator\Validator\ValidatorInterface;
/**
* Builds and process a form for editing a single entity field.
+ *
+ * @internal
*/
class QuickEditFieldForm extends FormBase {
/**
* Stores the tempstore factory.
*
- * @var \Drupal\user\PrivateTempStoreFactory
+ * @var \Drupal\Core\TempStore\PrivateTempStoreFactory
*/
protected $tempStoreFactory;
/**
* Constructs a new EditFieldForm.
*
- * @param \Drupal\user\PrivateTempStoreFactory $temp_store_factory
+ * @param \Drupal\Core\TempStore\PrivateTempStoreFactory $temp_store_factory
* The tempstore factory.
* @param \Drupal\Core\Extension\ModuleHandlerInterface $module_handler
* The module handler.
*/
public static function create(ContainerInterface $container) {
return new static(
- $container->get('user.private_tempstore'),
+ $container->get('tempstore.private'),
$container->get('module_handler'),
$container->get('entity.manager')->getStorage('node_type'),
$container->get('typed_data_manager')->getValidator()
'#attributes' => ['class' => ['quickedit-form-submit']],
];
+ // Use the non-inline form error display for Quick Edit forms, because in
+ // this case the errors are already near the form element.
+ $form['#disable_inline_form_errors'] = TRUE;
+
// Simplify it for optimal in-place use.
$this->simplify($form, $form_state);