3 namespace Drupal\Core\Condition\Annotation;
5 use Drupal\Component\Annotation\Plugin;
8 * Defines a condition plugin annotation object.
10 * Condition plugins provide generalized conditions for use in other
11 * operations, such as conditional block placement.
13 * Plugin Namespace: Plugin\Condition
15 * For a working example, see \Drupal\user\Plugin\Condition\UserRole.
17 * @see \Drupal\Core\Condition\ConditionManager
18 * @see \Drupal\Core\Condition\ConditionInterface
19 * @see \Drupal\Core\Condition\ConditionPluginBase
26 class Condition extends Plugin {
29 * The condition plugin ID.
36 * The human-readable name of the condition.
38 * @ingroup plugin_translatable
40 * @var \Drupal\Core\Annotation\Translation
45 * The name of the module providing the type.
52 * An array of context definitions describing the context used by the plugin.
54 * The array is keyed by context names.
56 * @var \Drupal\Core\Annotation\ContextDefinition[]
61 * The category under which the condition should listed in the UI.
63 * @var \Drupal\Core\Annotation\Translation
65 * @ingroup plugin_translatable