public function CurrentTime::submitConfigurationForm in RNG - Events and Registrations 8
Same name and namespace in other branches
- 8.2 src/Plugin/Condition/CurrentTime.php \Drupal\rng\Plugin\Condition\CurrentTime::submitConfigurationForm()
- 3.x src/Plugin/Condition/CurrentTime.php \Drupal\rng\Plugin\Condition\CurrentTime::submitConfigurationForm()
Form submission handler.
Parameters
array $form: An associative array containing the structure of the plugin form as built by static::buildConfigurationForm().
\Drupal\Core\Form\FormStateInterface $form_state: The current state of the form. Calling code should pass on a subform state created through \Drupal\Core\Form\SubformState::createForSubform().
Overrides ConditionPluginBase::submitConfigurationForm
1 call to CurrentTime::submitConfigurationForm()
- RuleScheduler::submitConfigurationForm in src/
Plugin/ Condition/ RuleScheduler.php - Form submission handler.
1 method overrides CurrentTime::submitConfigurationForm()
- RuleScheduler::submitConfigurationForm in src/
Plugin/ Condition/ RuleScheduler.php - Form submission handler.
File
- src/
Plugin/ Condition/ CurrentTime.php, line 76
Class
- CurrentTime
- Evaluates if the current date is before or after the the configured date.
Namespace
Drupal\rng\Plugin\ConditionCode
public function submitConfigurationForm(array &$form, FormStateInterface $form_state) {
parent::submitConfigurationForm($form, $form_state);
if ($date = $form_state
->getValue('date')) {
$this->configuration['date'] = $date
->format('U');
}
else {
$this->configuration['date'] = NULL;
}
}