public function ExportForm::processingMode in Default Content Deploy 8
Ajax callback for Mode form element.
Parameters
$form:
\Drupal\Core\Form\FormStateInterface $form_state:
Return value
array
File
- src/
Form/ ExportForm.php, line 199
Class
- ExportForm
- Config Form for run DCD deploy in Admin UI.
Namespace
Drupal\default_content_deploy\FormCode
public function processingMode($form, FormStateInterface $form_state) {
$mode = $form_state
->getValue('mode');
if ($mode != 'all') {
$form['settings']['entity_type']['#required'] = TRUE;
}
else {
$form['settings']['entity_type']['#required'] = FALSE;
$form['settings']['#attributes']['style'] = 'display:none';
}
return $form['settings'];
}