public function NumericOffset::process in Rules 8.3
Process the given value.
Parameters
mixed $value: The value to process.
\Drupal\rules\Context\ExecutionStateInterface $rules_state: The current Rules execution state containing all context variables.
Return value
mixed The processed value. Since the value can also be a primitive data type (a string for example) this function must return the value.
Throws
\Drupal\rules\Exception\EvaluationException Thrown when the data cannot be processed.
Overrides DataProcessorInterface::process
File
- src/
Plugin/ RulesDataProcessor/ NumericOffset.php, line 25
Class
- NumericOffset
- A data processor for applying numerical offsets.
Namespace
Drupal\rules\Plugin\RulesDataProcessorCode
public function process($value, ExecutionStateInterface $rules_state) {
return $value + $this->configuration['offset'];
}