Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
T
twilio
Manage
Activity
Members
Labels
Plan
Wiki
Custom issue tracker
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Model registry
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
project
twilio
Commits
0874c17d
Commit
0874c17d
authored
1 year ago
by
keshav
Committed by
Shashank Kumar
1 year ago
Browse files
Options
Downloads
Patches
Plain Diff
Issue
#3379015
: Remove unnecessary configuration form fields while saving form.
parent
8d316907
No related branches found
Branches containing commit
No related tags found
Tags containing commit
1 merge request
!29
Issue #3379015: Remove unnecessary configuration form fields while saving form.
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/Form/TwilioAdminForm.php
+11
-2
11 additions, 2 deletions
src/Form/TwilioAdminForm.php
with
11 additions
and
2 deletions
src/Form/TwilioAdminForm.php
+
11
−
2
View file @
0874c17d
...
...
@@ -57,9 +57,18 @@ class TwilioAdminForm extends ConfigFormBase {
*/
public
function
submitForm
(
array
&
$form
,
FormStateInterface
$form_state
)
{
$config
=
$this
->
config
(
'twilio.settings'
);
// Skip unnecessary fields.
$skip_fields
=
[
'form_build_id'
,
'form_token'
,
'form_id'
,
'twilio_callback_container'
,
'actions'
,
];
foreach
(
Element
::
children
(
$form
)
as
$variable
)
{
$config
->
set
(
$variable
,
$form_state
->
getValue
(
$form
[
$variable
][
'#parents'
]));
if
(
!
in_array
(
$variable
,
$skip_fields
)
)
{
$config
->
set
(
$variable
,
$form_state
->
getValue
(
$form
[
$variable
][
'#parents'
]));
}
}
$config
->
save
();
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment