class Condition
Same name in this branch
- 10 core/tests/fixtures/database_drivers/module/core_fake/src/Driver/Database/CoreFakeWithAllCustomClasses/Condition.php \Drupal\core_fake\Driver\Database\CoreFakeWithAllCustomClasses\Condition
- 10 core/lib/Drupal/Core/Config/Entity/Query/Condition.php \Drupal\Core\Config\Entity\Query\Condition
- 10 core/lib/Drupal/Core/Database/Query/Condition.php \Drupal\Core\Database\Query\Condition
- 10 core/lib/Drupal/Core/Entity/Query/Sql/Condition.php \Drupal\Core\Entity\Query\Sql\Condition
- 10 core/lib/Drupal/Core/Entity/Query/Sql/pgsql/Condition.php \Drupal\Core\Entity\Query\Sql\pgsql\Condition
- 10 core/lib/Drupal/Core/Entity/Query/Null/Condition.php \Drupal\Core\Entity\Query\Null\Condition
- 10 core/lib/Drupal/Core/Entity/KeyValueStore/Query/Condition.php \Drupal\Core\Entity\KeyValueStore\Query\Condition
- 10 core/lib/Drupal/Core/Condition/Attribute/Condition.php \Drupal\Core\Condition\Attribute\Condition
Same name in other branches
- 9 core/tests/fixtures/database_drivers/module/corefake/src/Driver/Database/corefakeWithAllCustomClasses/Condition.php \Drupal\corefake\Driver\Database\corefakeWithAllCustomClasses\Condition
- 9 core/lib/Drupal/Core/Config/Entity/Query/Condition.php \Drupal\Core\Config\Entity\Query\Condition
- 9 core/lib/Drupal/Core/Database/Query/Condition.php \Drupal\Core\Database\Query\Condition
- 9 core/lib/Drupal/Core/Entity/Query/Sql/Condition.php \Drupal\Core\Entity\Query\Sql\Condition
- 9 core/lib/Drupal/Core/Entity/Query/Sql/pgsql/Condition.php \Drupal\Core\Entity\Query\Sql\pgsql\Condition
- 9 core/lib/Drupal/Core/Entity/Query/Null/Condition.php \Drupal\Core\Entity\Query\Null\Condition
- 9 core/lib/Drupal/Core/Entity/KeyValueStore/Query/Condition.php \Drupal\Core\Entity\KeyValueStore\Query\Condition
- 9 core/lib/Drupal/Core/Condition/Annotation/Condition.php \Drupal\Core\Condition\Annotation\Condition
- 8.9.x core/lib/Drupal/Core/Config/Entity/Query/Condition.php \Drupal\Core\Config\Entity\Query\Condition
- 8.9.x core/lib/Drupal/Core/Database/Query/Condition.php \Drupal\Core\Database\Query\Condition
- 8.9.x core/lib/Drupal/Core/Entity/Query/Sql/Condition.php \Drupal\Core\Entity\Query\Sql\Condition
- 8.9.x core/lib/Drupal/Core/Entity/Query/Sql/pgsql/Condition.php \Drupal\Core\Entity\Query\Sql\pgsql\Condition
- 8.9.x core/lib/Drupal/Core/Entity/Query/Null/Condition.php \Drupal\Core\Entity\Query\Null\Condition
- 8.9.x core/lib/Drupal/Core/Entity/KeyValueStore/Query/Condition.php \Drupal\Core\Entity\KeyValueStore\Query\Condition
- 8.9.x core/lib/Drupal/Core/Condition/Annotation/Condition.php \Drupal\Core\Condition\Annotation\Condition
- 11.x core/tests/fixtures/database_drivers/module/core_fake/src/Driver/Database/CoreFakeWithAllCustomClasses/Condition.php \Drupal\core_fake\Driver\Database\CoreFakeWithAllCustomClasses\Condition
- 11.x core/lib/Drupal/Core/Config/Entity/Query/Condition.php \Drupal\Core\Config\Entity\Query\Condition
- 11.x core/lib/Drupal/Core/Database/Query/Condition.php \Drupal\Core\Database\Query\Condition
- 11.x core/lib/Drupal/Core/Entity/Query/Sql/Condition.php \Drupal\Core\Entity\Query\Sql\Condition
- 11.x core/lib/Drupal/Core/Entity/Query/Sql/pgsql/Condition.php \Drupal\Core\Entity\Query\Sql\pgsql\Condition
- 11.x core/lib/Drupal/Core/Entity/Query/Null/Condition.php \Drupal\Core\Entity\Query\Null\Condition
- 11.x core/lib/Drupal/Core/Entity/KeyValueStore/Query/Condition.php \Drupal\Core\Entity\KeyValueStore\Query\Condition
- 11.x core/lib/Drupal/Core/Condition/Attribute/Condition.php \Drupal\Core\Condition\Attribute\Condition
- 11.x core/lib/Drupal/Core/Condition/Annotation/Condition.php \Drupal\Core\Condition\Annotation\Condition
Defines a condition plugin annotation object.
Condition plugins provide generalized conditions for use in other operations, such as conditional block placement.
Plugin Namespace: Plugin\Condition
For a working example, see \Drupal\user\Plugin\Condition\UserRole.
Hierarchy
- class \Drupal\Component\Annotation\Plugin implements \Drupal\Component\Annotation\AnnotationInterface
- class \Drupal\Core\Condition\Annotation\Condition extends \Drupal\Component\Annotation\Plugin
Expanded class hierarchy of Condition
See also
\Drupal\Core\Condition\ConditionManager
\Drupal\Core\Condition\ConditionInterface
\Drupal\Core\Condition\ConditionPluginBase
Related topics
7 string references to 'Condition'
- ConditionAggregate::compile in core/
lib/ Drupal/ Core/ Entity/ Query/ Sql/ ConditionAggregate.php - ConditionManager::getType in core/
lib/ Drupal/ Core/ Condition/ ConditionManager.php - Connection::condition in core/
lib/ Drupal/ Core/ Database/ Connection.php - Prepares and returns a CONDITION query object.
- Connection::getDriverClass in core/
lib/ Drupal/ Core/ Database/ Connection.php - Gets the driver-specific override class if any for the specified class.
- ConnectionTest::providerGetDriverClass in core/
tests/ Drupal/ Tests/ Core/ Database/ ConnectionTest.php - Data provider for testGetDriverClass().
File
-
core/
lib/ Drupal/ Core/ Condition/ Annotation/ Condition.php, line 26
Namespace
Drupal\Core\Condition\AnnotationView source
class Condition extends Plugin {
/**
* The condition plugin ID.
*
* @var string
*/
public $id;
/**
* The human-readable name of the condition.
*
* @ingroup plugin_translatable
*
* @var \Drupal\Core\Annotation\Translation
*/
public $label;
/**
* The name of the module providing the type.
*
* @var string
*/
public $module;
/**
* An array of context definitions describing the context used by the plugin.
*
* The array is keyed by context names.
*
* @var \Drupal\Core\Annotation\ContextDefinition[]
*/
public $context_definitions = [];
/**
* The category under which the condition should listed in the UI.
*
* @var \Drupal\Core\Annotation\Translation
*
* @ingroup plugin_translatable
*/
public $category;
}
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::$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 | Overrides AnnotationInterface::get | 6 | |
Plugin::getClass | public | function | Overrides AnnotationInterface::getClass | 1 | |
Plugin::getId | public | function | Overrides AnnotationInterface::getId | ||
Plugin::getProvider | public | function | Overrides AnnotationInterface::getProvider | 1 | |
Plugin::parse | protected | function | Parses an annotation into its definition. | ||
Plugin::setClass | public | function | Overrides AnnotationInterface::setClass | 1 | |
Plugin::setProvider | public | function | Overrides AnnotationInterface::setProvider | ||
Plugin::__construct | public | function | Constructs a Plugin object. | 3 |
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.