public static function ProcessStatesTrait::processStates in Duration Field 3.0.x
Same name and namespace in other branches
- 8.2 src/Element/ProcessStatesTrait.php \Drupal\duration_field\Element\ProcessStatesTrait::processStates()
Processes a form element for #states support.
Parameters
array $element: A render array element having a #states property.
2 calls to ProcessStatesTrait::processStates()
- DurationElement::processElement in src/
Element/ DurationElement.php - GranularityElement::processElement in src/
Element/ GranularityElement.php
File
- src/
Element/ ProcessStatesTrait.php, line 30
Class
- ProcessStatesTrait
- Provides BC layer for invoking drupal_process_states() when needed.
Namespace
Drupal\duration_field\ElementCode
public static function processStates(array &$element) {
if (method_exists('\\Drupal\\Core\\Form\\FormHelper', 'processStates')) {
FormHelper::processStates($element);
}
else {
// @noRector
// @phpstan-ignore-next-line
drupal_process_states($element);
}
}