function NumericOffset::process

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.

Overrides DataProcessorInterface::process

File

src/Plugin/RulesDataProcessor/NumericOffset.php, line 25

Class

NumericOffset
A data processor for applying numerical offsets.

Namespace

Drupal\rules\Plugin\RulesDataProcessor

Code

public function process($value, ExecutionStateInterface $rules_state) {
    return $value + $this->configuration['offset'];
}