public static function CircleV2::addMoreSubmit in Build Hooks 8.2
Same name and namespace in other branches
- 3.x modules/build_hooks_circleci/src/Plugin/FrontendEnvironment/CircleV2.php \Drupal\build_hooks_circleci\Plugin\FrontendEnvironment\CircleV2::addMoreSubmit()
Submission handler for the "Add another parameter" button.
File
- modules/
build_hooks_circleci/ src/ Plugin/ FrontendEnvironment/ CircleV2.php, line 201
Class
- CircleV2
- Defines a circle v2 environment.
Namespace
Drupal\build_hooks_circleci\Plugin\FrontendEnvironmentCode
public static function addMoreSubmit(array $form, FormStateInterface $form_state) {
$parameters = $form_state
->getValue([
'settings',
'parameters',
], []);
$parameters[] = [
'name' => '',
'type' => 'string',
'value' => '',
];
$form_state
->setValue([
'settings',
'parameters',
], $parameters);
$form_state
->setRebuild();
}