diff --git a/core/lib/Drupal/Core/Entity/EntityFormBuilder.php b/core/lib/Drupal/Core/Entity/EntityFormBuilder.php index 045a3f9..3a825be 100644 --- a/core/lib/Drupal/Core/Entity/EntityFormBuilder.php +++ b/core/lib/Drupal/Core/Entity/EntityFormBuilder.php @@ -45,7 +45,7 @@ public function __construct(EntityManagerInterface $entity_manager, FormBuilderI /** * {@inheritdoc} */ - public function getForm(EntityInterface $entity, $operation = 'default', $form_state_additions = array()) { + public function getForm(EntityInterface $entity, $operation = 'default', array $form_state_additions = array()) { $form_object = $this->entityManager->getFormObject($entity->getEntityTypeId(), $operation); $form_object->setEntity($entity); diff --git a/core/lib/Drupal/Core/Entity/EntityFormBuilderInterface.php b/core/lib/Drupal/Core/Entity/EntityFormBuilderInterface.php index d980758..584595f 100644 --- a/core/lib/Drupal/Core/Entity/EntityFormBuilderInterface.php +++ b/core/lib/Drupal/Core/Entity/EntityFormBuilderInterface.php @@ -37,6 +37,6 @@ * @return array * The processed form for the given entity and operation. */ - public function getForm(EntityInterface $entity, $operation = 'default', $form_state_additions = array()); + public function getForm(EntityInterface $entity, $operation = 'default', array $form_state_additions = array()); } diff --git a/core/lib/Drupal/Core/Form/FormBase.php b/core/lib/Drupal/Core/Form/FormBase.php index f64b03f..8bab5ab 100644 --- a/core/lib/Drupal/Core/Form/FormBase.php +++ b/core/lib/Drupal/Core/Form/FormBase.php @@ -176,6 +176,8 @@ private function container() { * * @deprecated Use \Drupal\Core\Form\FormStateInterface::setErrorByName(). * + * @todo Remove in https://www.drupal.org/node/2308821. + * * @return $this */ protected function setFormError($name, FormStateInterface $form_state, $message = '') { diff --git a/core/lib/Drupal/Core/Form/FormBuilder.php b/core/lib/Drupal/Core/Form/FormBuilder.php index 62b27ba..360702d 100644 --- a/core/lib/Drupal/Core/Form/FormBuilder.php +++ b/core/lib/Drupal/Core/Form/FormBuilder.php @@ -1129,6 +1129,7 @@ protected function buttonWasClicked($element, FormStateInterface &$form_state) { public function setValue($element, $value, FormStateInterface &$form_state) { $values = $form_state->getValues(); NestedArray::setValue($values, $element['#parents'], $value, TRUE); + $form_state->set('values', $values); } /**