function ContextDefinition::create
The created context definition object.
Overrides ContextDefinition::create
8 calls to ContextDefinition::create()
- AutocompleteTest::testListAutocomplete in tests/
src/ Kernel/ Engine/ AutocompleteTest.php - Tests that autocomplete results for a flat list are correct.
- AutocompleteTest::testNodeAutocomplete in tests/
src/ Kernel/ Engine/ AutocompleteTest.php - Test various node example data selectors.
- RulesComponentActionTest::testAutosaveOnlyOnce in tests/
src/ Unit/ Integration/ RulesAction/ RulesComponentActionTest.php - Tests that auto saving is only triggered once with nested components.
- RulesComponentActionTest::testContextDefinitions in tests/
src/ Unit/ Integration/ RulesAction/ RulesComponentActionTest.php - Tests that context definitions are available on the derived action.
- RulesComponentActionTest::testExecute in tests/
src/ Unit/ Integration/ RulesAction/ RulesComponentActionTest.php - Tests that the execution of the action invokes the Rules component.
File
-
src/
Context/ ContextDefinition.php, line 69
Class
- ContextDefinition
- Extends the core context definition class with useful methods.
Namespace
Drupal\rules\ContextCode
public static function create($data_type = 'any') {
if (strpos($data_type, 'entity:') === 0) {
return new EntityContextDefinition($data_type);
}
return new static($data_type);
}