Closed (fixed)
Project:
Rules
Version:
8.x-3.x-dev
Component:
Rules Core
Priority:
Major
Category:
Task
Assigned:
Unassigned
Reporter:
Created:
7 Jun 2015 at 13:29 UTC
Updated:
7 Oct 2015 at 14:04 UTC
Jump to comment: Most recent
In d7 parameters can be defined using the following keys:
* - restriction: (optional) Restrict how the argument for this parameter may
* be provided. Supported values are 'selector' and 'input'.
* - default mode: (optional) Customize the default mode for providing the
* argument value for a parameter. Supported values are 'selector' and
* 'input'. The default depends on the required data type.We need the same functionality for d8. Although we cannot leverage this in the very near future, imo we should define that soon so people can already specify it when writing actions.
Comments
Comment #1
Torenware commentedFago --
Could you elaborate a bit on this?
I'm starting to work in areas of the code that process context, and it's not clear what "pre-configured" or "mapped only" mean.
A \Drupal\rules\Context\ContextConfig object contains a protected $config member that contains
It's not clear what these do, or how they need to map to what APIs are used to manipulate contexts for actions or conditions. The tests don't really cover this yet.
Comment #2
fagothis issue is actually fixed, see ContextDefinitionInterface that's part of Rules.
@question: Look at the respective methods of the ContextConfig object, they describe what the keys are up for. They keys really are just the internal storage format and shouldn't be of interested for you - you can and should always use the ContextConfig class outside of RulesExpression classes.
If that's not clear, I'm happy to explain the concepts in person also.