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://drupal.org/node/2006248.
Expanded class hierarchy of ConditionInterface
All classes that implement ConditionInterface
\Drupal\Core\TypedData\TypedDataManager::create()
\Drupal\Core\Executable\ExecutableInterface
interface ConditionInterface extends ExecutableInterface, FormInterface {
/**
* Determines whether condition result will be negated.
*
* @return boolean
* Whether the condition result will be negated.
*/
public function isNegated();
/**
* Evaluates the condition and returns TRUE or FALSE accordingly.
*
* @return bool
* TRUE if the condition has been met, FALSE otherwise.
*/
public function evaluate();
/**
* Provides a human readable summary of the condition's configuration.
*/
public function summary();
/**
* Sets the executable manager class.
*
* @param \Drupal\Core\Executable\ExecutableManagerInterface $executableManager
* The executable manager.
*/
public function setExecutableManager(ExecutableManagerInterface $executableManager);
}
Name![]() |
Modifiers | Type | Description | Overrides |
---|---|---|---|---|
ConditionInterface:: |
public | function | Evaluates the condition and returns TRUE or FALSE accordingly. | 3 |
ConditionInterface:: |
public | function | Determines whether condition result will be negated. | 1 |
ConditionInterface:: |
public | function | Sets the executable manager class. | |
ConditionInterface:: |
public | function | Provides a human readable summary of the condition's configuration. | 3 |
ExecutableInterface:: |
public | function | Executes the plugin. | 25 |
FormInterface:: |
public | function | Form constructor. | 36 |
FormInterface:: |
public | function | Returns a unique string identifying the form. | 90 |
FormInterface:: |
public | function | Form submission handler. | 55 |
FormInterface:: |
public | function | Form validation handler. | 27 |