class Condition
Extension of the Condition annotation class.
This class adds a configuration access parameter to the Condition annotation.
Hierarchy
- class \Drupal\Component\Annotation\Plugin implements \Drupal\Component\Annotation\AnnotationInterface
Expanded class hierarchy of Condition
13 string references to 'Condition'
- AnnotationProcessingTest::provideRulesPlugins in tests/
src/ Unit/ Integration/ Engine/ AnnotationProcessingTest.php - Provider for plugins to test.
- AnnotationProcessingTest::testCheckConfiguration in tests/
src/ Unit/ Integration/ Engine/ AnnotationProcessingTest.php - Tests if our ContextDefinition annotations are correctly processed.
- ConditionForm::form in src/
Form/ Expression/ ConditionForm.php - Adds elements specific to the expression to the form.
- ConfigureAndExecuteTest::testConfigureAndExecute in tests/
src/ Functional/ ConfigureAndExecuteTest.php - Tests creation of a rule and then triggering its execution.
- RulesComponentListBuilderTest::testCancelExpressionInComponent in tests/
src/ Functional/ RulesComponentListBuilderTest.php - Tests that cancelling an expression from a component works.
23 classes are annotated with Condition
- DataComparison in src/
Plugin/ Condition/ DataComparison.php - Provides a 'Data comparison' condition.
- DataIsEmpty in src/
Plugin/ Condition/ DataIsEmpty.php - Provides a 'Data value is empty' condition.
- DataListContains in src/
Plugin/ Condition/ DataListContains.php - Provides a 'List contains' condition.
- DataListCountIs in src/
Plugin/ Condition/ DataListCountIs.php - Provides a 'List count comparison' condition.
- EntityHasField in src/
Plugin/ Condition/ EntityHasField.php - Provides a 'Entity has field' condition.
File
-
src/
Core/ Annotation/ Condition.php, line 15
Namespace
Drupal\rules\Core\AnnotationView source
class Condition extends CoreConditionAnnotation {
/**
* The permissions allowed to access the configuration UI for this plugin.
*
* @var string[]
* Array of permission strings as declared in a *.permissions.yml file. If
* any one of these permissions apply for the relevant user, we allow
* access.
*
* The key should be used as follows. Note that we add a space between "@"
* and "Condition", since we do not want to trigger the annotation parser
* here; you should remove that space in your actual annotation:
*
* @ Condition(
* id = "my_module_user_is_blocked",
* label = @Translation("My User is blocked"),
* category = @Translation("User"),
* context_definitions = {
* "user" = @ContextDefinition("entity:user",
* label = @Translation("User")
* ),
* configure_permissions = {
* "administer users",
* "block users"
* }
* }
* )
*/
public $configure_permissions;
}
Members
Title Sort descending | Modifiers | Object type | Summary | Overriden Title | Overrides |
---|---|---|---|---|---|
Condition::$category | public | property | The category under which the condition should listed in the UI. | ||
Condition::$configure_permissions | public | property | The permissions allowed to access the configuration UI for this plugin. | ||
Condition::$context_definitions | public | property | An array of context definitions describing the context used by the plugin. | ||
Condition::$id | public | property | The condition plugin ID. | ||
Condition::$label | public | property | The human-readable name of the condition. | ||
Condition::$module | public | property | The name of the module providing the type. | ||
Plugin::$definition | protected | property | The plugin definition read from the class annotation. | 1 | |
Plugin::get | public | function | Gets the value of an annotation. | Overrides AnnotationInterface::get | 6 |
Plugin::getClass | public | function | Gets the class of the annotated class. | Overrides AnnotationInterface::getClass | 1 |
Plugin::getId | public | function | Gets the unique ID for this annotated class. | Overrides AnnotationInterface::getId | |
Plugin::getProvider | public | function | Gets the name of the provider of the annotated class. | Overrides AnnotationInterface::getProvider | 1 |
Plugin::parse | protected | function | Parses an annotation into its definition. | ||
Plugin::setClass | public | function | Sets the class of the annotated class. | Overrides AnnotationInterface::setClass | 1 |
Plugin::setProvider | public | function | Sets the name of the provider of the annotated class. | Overrides AnnotationInterface::setProvider | |
Plugin::__construct | public | function | Constructs a Plugin object. | 3 |