diff --git a/src/Form/SubformState.php b/src/Form/SubformState.php index 9fc07775fa112001d2be2225c371eaa0968248df..92178c35d72b600f3cae6db3f410eadca17d0280 100644 --- a/src/Form/SubformState.php +++ b/src/Form/SubformState.php @@ -3,8 +3,9 @@ namespace Drupal\markdown\Form; use Drupal\Component\Serialization\Json; +use Drupal\Core\Form\FormInterface; use Drupal\Core\Form\FormStateInterface; -use Drupal\markdown\BcSupport\SubformState as CoreSubformState; +use Drupal\Core\Form\SubformState as CoreSubformState; use Drupal\markdown\Traits\FormTrait; /** @@ -54,7 +55,7 @@ class SubformState extends CoreSubformState implements SubformStateInterface { /** * {@inheritdoc} */ - public static function createForSubform(array &$subform, array &$parent_form, FormStateInterface $parent_form_state) { + public static function createForSubform(array &$subform, array &$parent_form, FormStateInterface $parent_form_state, ?FormInterface $subform_form_object = null) { // Attempt to construct #parents array based on passed values. if (!isset($subform['#parents']) && $parent_form_state instanceof SubformStateInterface && ($name = array_search($subform, $parent_form, TRUE))) { $subform['#parents'] = array_merge($parent_form_state->getAllParents(), [$name]); diff --git a/src/Form/SubformStateInterface.php b/src/Form/SubformStateInterface.php index a4f7d6260a175726632712536a0b619d137ccfb0..44bb98b38dc532d0eb5a973fb340e418e2b5a303 100644 --- a/src/Form/SubformStateInterface.php +++ b/src/Form/SubformStateInterface.php @@ -2,7 +2,7 @@ namespace Drupal\markdown\Form; -use Drupal\markdown\BcSupport\SubformStateInterface as CoreSubformStateInterface; +use Drupal\Core\Form\SubformStateInterface as CoreSubformStateInterface; /** * Interface for markdown plugin subforms.