Condition.php

Same filename in this branch
  1. 9 core/tests/fixtures/database_drivers/module/corefake/src/Driver/Database/corefakeWithAllCustomClasses/Condition.php
  2. 9 core/lib/Drupal/Core/Config/Entity/Query/Condition.php
  3. 9 core/lib/Drupal/Core/Database/Query/Condition.php
  4. 9 core/lib/Drupal/Core/Entity/Query/Sql/Condition.php
  5. 9 core/lib/Drupal/Core/Entity/Query/Sql/pgsql/Condition.php
  6. 9 core/lib/Drupal/Core/Entity/Query/Null/Condition.php
  7. 9 core/lib/Drupal/Core/Entity/KeyValueStore/Query/Condition.php
Same filename in other branches
  1. 8.9.x core/lib/Drupal/Core/Config/Entity/Query/Condition.php
  2. 8.9.x core/lib/Drupal/Core/Database/Query/Condition.php
  3. 8.9.x core/lib/Drupal/Core/Entity/Query/Sql/Condition.php
  4. 8.9.x core/lib/Drupal/Core/Entity/Query/Sql/pgsql/Condition.php
  5. 8.9.x core/lib/Drupal/Core/Entity/Query/Null/Condition.php
  6. 8.9.x core/lib/Drupal/Core/Entity/KeyValueStore/Query/Condition.php
  7. 8.9.x core/lib/Drupal/Core/Condition/Annotation/Condition.php
  8. 10 core/tests/fixtures/database_drivers/module/core_fake/src/Driver/Database/CoreFakeWithAllCustomClasses/Condition.php
  9. 10 core/lib/Drupal/Core/Config/Entity/Query/Condition.php
  10. 10 core/lib/Drupal/Core/Database/Query/Condition.php
  11. 10 core/lib/Drupal/Core/Entity/Query/Sql/Condition.php
  12. 10 core/lib/Drupal/Core/Entity/Query/Sql/pgsql/Condition.php
  13. 10 core/lib/Drupal/Core/Entity/Query/Null/Condition.php
  14. 10 core/lib/Drupal/Core/Entity/KeyValueStore/Query/Condition.php
  15. 10 core/lib/Drupal/Core/Condition/Attribute/Condition.php
  16. 10 core/lib/Drupal/Core/Condition/Annotation/Condition.php
  17. 11.x core/tests/fixtures/database_drivers/module/core_fake/src/Driver/Database/CoreFakeWithAllCustomClasses/Condition.php
  18. 11.x core/lib/Drupal/Core/Config/Entity/Query/Condition.php
  19. 11.x core/lib/Drupal/Core/Database/Query/Condition.php
  20. 11.x core/lib/Drupal/Core/Entity/Query/Sql/Condition.php
  21. 11.x core/lib/Drupal/Core/Entity/Query/Sql/pgsql/Condition.php
  22. 11.x core/lib/Drupal/Core/Entity/Query/Null/Condition.php
  23. 11.x core/lib/Drupal/Core/Entity/KeyValueStore/Query/Condition.php
  24. 11.x core/lib/Drupal/Core/Condition/Attribute/Condition.php
  25. 11.x core/lib/Drupal/Core/Condition/Annotation/Condition.php

Namespace

Drupal\Core\Condition\Annotation

File

core/lib/Drupal/Core/Condition/Annotation/Condition.php

View source
<?php

namespace Drupal\Core\Condition\Annotation;

use Drupal\Component\Annotation\Plugin;

/**
 * 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.
 *
 * @see \Drupal\Core\Condition\ConditionManager
 * @see \Drupal\Core\Condition\ConditionInterface
 * @see \Drupal\Core\Condition\ConditionPluginBase
 * @see block_api
 *
 * @ingroup plugin_api
 *
 * @Annotation
 */
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;

}

Classes

Title Deprecated Summary
Condition Defines a condition plugin annotation object.

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.