class Condition in Rules 8.3
Extension of the Condition annotation class.
This class adds a configuration access parameter to the Condition annotation.
Hierarchy
- class \Drupal\Component\Annotation\Plugin implements AnnotationInterface
Expanded class hierarchy of Condition
8 string references to 'Condition'
- 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.
- ConfigureAndExecuteTest::testMultipleInputContext in tests/
src/ Functional/ ConfigureAndExecuteTest.php - Tests user input in context form for 'multiple' valued context variables.
- RulesUiEmbedTest::testExampleUi in tests/
src/ Functional/ RulesUiEmbedTest.php - @covers \Drupal\rules_test_ui_embed\Form\SettingsForm
- TempStorageTest::testLocking in tests/
src/ Functional/ TempStorageTest.php - Tests that editing a rule locks it for another user.
7 classes are annotated with Condition
- IpIsBanned in src/
Plugin/ Condition/ IpIsBanned.php - Provides an 'IP address is blocked' condition.
- NodeIsOfType in src/
Plugin/ Condition/ NodeIsOfType.php - Provides a 'Node is of type' condition.
- TestConditionFalse in tests/
modules/ rules_test/ src/ Plugin/ Condition/ TestConditionFalse.php - Provides an always-FALSE test condition.
- TestConditionProvider in tests/
modules/ rules_test/ src/ Plugin/ Condition/ TestConditionProvider.php - Test condition that adds a variable with the provided context.
- TestConditionTrue in tests/
modules/ rules_test/ src/ Plugin/ Condition/ TestConditionTrue.php - Provides an always-TRUE test 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
Name![]() |
Modifiers | Type | Description | Overrides |
---|---|---|---|---|
Condition:: |
public | property | The category under which the condition should listed in the UI. | |
Condition:: |
public | property | The permissions allowed to access the configuration UI for this plugin. | |
Condition:: |
public | property | An array of context definitions describing the context used by the plugin. | |
Condition:: |
public | property | An array of context definitions describing the context used by the plugin. | |
Condition:: |
public | property | The condition plugin ID. | |
Condition:: |
public | property | The human-readable name of the condition. | |
Condition:: |
public | property | The name of the module providing the type. | |
Plugin:: |
protected | property | The plugin definition read from the class annotation. | 1 |
Plugin:: |
public | function |
Gets the value of an annotation. Overrides AnnotationInterface:: |
5 |
Plugin:: |
public | function |
Gets the class of the annotated class. Overrides AnnotationInterface:: |
|
Plugin:: |
public | function |
Gets the unique ID for this annotated class. Overrides AnnotationInterface:: |
|
Plugin:: |
public | function |
Gets the name of the provider of the annotated class. Overrides AnnotationInterface:: |
|
Plugin:: |
protected | function | Parses an annotation into its definition. | |
Plugin:: |
public | function |
Sets the class of the annotated class. Overrides AnnotationInterface:: |
|
Plugin:: |
public | function |
Sets the name of the provider of the annotated class. Overrides AnnotationInterface:: |
|
Plugin:: |
public | function | Constructs a Plugin object. | 2 |