Skip to content
Snippets Groups Projects

Draft: Issue #3197304: Provide form element and reuse that in field widget

Merge request reports

Members who can merge are allowed to add commits.
Code Quality is loading
Test summary results are being parsed
Ready to merge by members who can write to the target branch.
Loading

Activity

Filter activity
  • Approvals
  • Assignees & reviewers
  • Comments (from bots)
  • Comments (from users)
  • Commits & branches
  • Edits
  • Labels
  • Lock status
  • Mentions
  • Merge request status
  • Tracking
88 ];
89
90 if ($selected_plugin_id = $form_state->getValue([...$element['#array_parents'], 'plugin_id'])) {
91 // A value set in the form by the user prior to an AJAX submission takes
92 // precedence.
93 }
94 elseif ($selected_plugin_id = $form_state->getValue([...$element['#array_parents'], 'container', 'plugin_id'])) {
95 // On a non-JS 'Choose' button submission, the valueCallback has not
96 // (yet?) run, and so our value is still inside the container. WTF.
97 }
98 elseif (isset($element['#default_value']['plugin_id'])) {
99 $selected_plugin_id = $element['#default_value']['plugin_id'];
100 }
101 else {
102 // If we still don't have anything, use an empty value.
103 $selected_entity_type_id = '';
  • Loading
  • Loading
  • Loading
  • Loading
  • Loading
  • Loading
  • Loading
  • Loading
  • Loading
  • Loading
  • Please register or sign in to reply
    Loading