PluginVersionRuleProcessor
in package
implements
RuleProcessorInterface
Rule processor for sending when the provided plugin is activated and matches the specified version.
Interfaces, Classes and Traits
- RuleProcessorInterface
- Rule processor interface
Table of Contents
- $plugins_provider : PluginsProviderInterface
- Plugins provider instance.
- __construct() : mixed
- Constructor.
- process() : bool
- Process the rule.
- validate() : bool
- Validates the rule.
Properties
$plugins_provider
Plugins provider instance.
private
PluginsProviderInterface
$plugins_provider
Methods
__construct()
Constructor.
public
__construct([PluginsProviderInterface $plugins_provider = null ]) : mixed
Parameters
- $plugins_provider : PluginsProviderInterface = null
-
The plugins provider.
Return values
mixed —process()
Process the rule.
public
process(object $rule, object $stored_state) : bool
Parameters
- $rule : object
-
The specific rule being processed by this rule processor.
- $stored_state : object
-
Stored state.
Return values
bool — Whether the rule passes or not.validate()
Validates the rule.
public
validate(object $rule) : bool
Parameters
- $rule : object
-
The rule to validate.