An interface for condition plugins.
Condition plugins are context-aware and configurable. They support the following keys in their plugin definitions:
@todo Replace the dependency on \Drupal\Core\Form\FormInterface with a new interface from https://www.drupal.org/node/2006248. @todo WARNING: The condition API is going to receive some additions before release. The following additions are likely to happen:
\Drupal\Core\TypedData\TypedDataManager::create()
\Drupal\Core\Executable\ExecutableInterface
\Drupal\Core\Condition\ConditionManager
\Drupal\Core\Condition\Annotation\Condition
\Drupal\Core\Condition\ConditionPluginBase
Name | Modifiers | Type | Description |
---|---|---|---|
CacheableDependencyInterface::getCacheContexts | public | function | The cache contexts associated with this object. Overrides CacheableDependencyInterface::getCacheContexts |
CacheableDependencyInterface::getCacheMaxAge | public | function | The maximum age for which this object may be cached. Overrides CacheableDependencyInterface::getCacheMaxAge |
CacheableDependencyInterface::getCacheTags | public | function | The cache tags associated with this object. Overrides CacheableDependencyInterface::getCacheTags |
ConditionInterface::evaluate | public | function | Evaluates the condition and returns TRUE or FALSE accordingly. |
ConditionInterface::isNegated | public | function | Determines whether condition result will be negated. |
ConditionInterface::setExecutableManager | public | function | Sets the executable manager class. |
ConditionInterface::summary | public | function | Provides a human readable summary of the condition's configuration. |
ConfigurablePluginInterface::defaultConfiguration | public | function | Gets default configuration for this plugin. |
ConfigurablePluginInterface::getConfiguration | public | function | Gets this plugin's configuration. |
ConfigurablePluginInterface::setConfiguration | public | function | Sets the configuration for this plugin instance. |
DependentPluginInterface::calculateDependencies | public | function | Calculates dependencies for the configured plugin. |
ExecutableInterface::execute | public | function | Executes the plugin. |
PluginFormInterface::buildConfigurationForm | public | function | Form constructor. |
PluginFormInterface::submitConfigurationForm | public | function | Form submission handler. |
PluginFormInterface::validateConfigurationForm | public | function | Form validation handler. |
PluginInspectionInterface::getPluginDefinition | public | function | Gets the definition of the plugin implementation. |
PluginInspectionInterface::getPluginId | public | function | Gets the plugin_id of the plugin instance. |
© 2001–2016 by the original authors
Licensed under the GNU General Public License, version 2 and later.
Drupal is a registered trademark of Dries Buytaert.
https://api.drupal.org/api/drupal/core!lib!Drupal!Core!Condition!ConditionInterface.php/interface/ConditionInterface/8.1.x