public function ModerationStateWidget::processComponentInput in Lightning Workflow 8.3
Same name and namespace in other branches
- 8.2 modules/lightning_scheduler/src/Plugin/Field/FieldWidget/ModerationStateWidget.php \Drupal\lightning_scheduler\Plugin\Field\FieldWidget\ModerationStateWidget::processComponentInput()
Process callback for the scheduler component's input element.
Parameters
array $element: The unprocessed element.
\Drupal\Core\Form\FormStateInterface $form_state: The current form state.
Return value
array The processed element.
File
- modules/
lightning_scheduler/ src/ Plugin/ Field/ FieldWidget/ ModerationStateWidget.php, line 204
Class
- ModerationStateWidget
- Scheduler extension of Content Moderation's widget.
Namespace
Drupal\lightning_scheduler\Plugin\Field\FieldWidgetCode
public function processComponentInput(array $element, FormStateInterface $form_state) {
$key = $element['#parents'];
if ($form_state
->hasValue($key)) {
$element['#default_value'] = $form_state
->getValue($key);
}
return $element;
}