interface ExpressionContainerInterface
Defines a common interface for expressions containing other expressions.
Usually expression containers also implement the ActionExpressionContainerInterface or ConditionExpressionContainerInterface in order to denote whether it contains action or condition expressions.
Hierarchy
- interface \Drupal\Component\Plugin\ConfigurableInterface; interface \Drupal\Component\Plugin\DependentPluginInterface; interface \Drupal\Component\Plugin\PluginInspectionInterface; interface \Drupal\Core\Executable\ExecutableInterface
- interface \Drupal\rules\Engine\ExpressionInterface extends \Drupal\Core\Executable\ExecutableInterface, \Drupal\Component\Plugin\ConfigurableInterface, \Drupal\Component\Plugin\DependentPluginInterface, \Drupal\Component\Plugin\PluginInspectionInterface
- interface \Drupal\rules\Engine\ExpressionContainerInterface extends \Drupal\rules\Engine\ExpressionInterface, \Drupal\rules\Engine\IteratorAggregate
 
 
 - interface \Drupal\rules\Engine\ExpressionInterface extends \Drupal\Core\Executable\ExecutableInterface, \Drupal\Component\Plugin\ConfigurableInterface, \Drupal\Component\Plugin\DependentPluginInterface, \Drupal\Component\Plugin\PluginInspectionInterface
 
Expanded class hierarchy of ExpressionContainerInterface
All classes that implement ExpressionContainerInterface
1 file declares its use of ExpressionContainerInterface
- AddExpressionForm.php in src/
Form/ AddExpressionForm.php  
File
- 
              src/
Engine/ ExpressionContainerInterface.php, line 14  
Namespace
Drupal\rules\EngineView source
interface ExpressionContainerInterface extends ExpressionInterface, \IteratorAggregate {
  
  /**
   * Creates and adds an expression.
   *
   * @param string $plugin_id
   *   The id of the expression plugin to add.
   * @param \Drupal\rules\Context\ContextConfig $config
   *   (optional) The configuration for the specified plugin.
   *
   * @throws \Drupal\rules\Exception\InvalidExpressionException
   *   Thrown if the wrong expression is passed; e.g. if a condition expression
   *   is added to an action expression container.
   *
   * @return $this
   */
  public function addExpression($plugin_id, ContextConfig $config = NULL);
  
  /**
   * Adds an expression object.
   *
   * @param \Drupal\rules\Engine\ExpressionInterface $expression
   *   The expression object.
   *
   * @throws \Drupal\rules\Exception\InvalidExpressionException
   *   Thrown if the wrong expression is passed; e.g. if a condition expression
   *   is added to an action expression container.
   *
   * @return $this
   */
  public function addExpressionObject(ExpressionInterface $expression);
  
  /**
   * Looks up the expression by UUID in this container.
   *
   * @param string $uuid
   *   The UUID of the expression.
   *
   * @return \Drupal\rules\Engine\ExpressionInterface|false
   *   The expression object or FALSE if not expression object with that UUID
   *   could be found.
   */
  public function getExpression($uuid);
  
  /**
   * Deletes an expression identified by the specified UUID in the container.
   *
   * @param string $uuid
   *   The UUID of the expression.
   *
   * @return bool
   *   TRUE if an expression was deleted, FALSE if no expression with that UUID
   *   was found.
   */
  public function deleteExpression($uuid);
  
  /**
   * Returns an iterator for expressions in this container.
   *
   * @return \Traversable
   *   An object that may be iterated with "foreach".
   */
  public function getIterator() : \Traversable;
}
Members
| Title Sort descending | Modifiers | Object type | Summary | Overrides | 
|---|---|---|---|---|
| ConfigurableInterface::defaultConfiguration | public | function | Gets default configuration for this plugin. | 24 | 
| ConfigurableInterface::getConfiguration | public | function | Gets this plugin's configuration. | 15 | 
| ConfigurableInterface::setConfiguration | public | function | Sets the configuration for this plugin instance. | 15 | 
| DependentPluginInterface::calculateDependencies | public | function | Calculates dependencies for the configured plugin. | 20 | 
| ExecutableInterface::execute | public | function | Executes the plugin. | 21 | 
| ExpressionContainerInterface::addExpression | public | function | Creates and adds an expression. | 2 | 
| ExpressionContainerInterface::addExpressionObject | public | function | Adds an expression object. | 3 | 
| ExpressionContainerInterface::deleteExpression | public | function | Deletes an expression identified by the specified UUID in the container. | 3 | 
| ExpressionContainerInterface::getExpression | public | function | Looks up the expression by UUID in this container. | 3 | 
| ExpressionContainerInterface::getIterator | public | function | Returns an iterator for expressions in this container. | 3 | 
| ExpressionInterface::checkIntegrity | public | function | Verifies that this expression is configured correctly. | 4 | 
| ExpressionInterface::executeWithState | public | function | Execute the expression with a given Rules state. | 6 | 
| ExpressionInterface::getFormHandler | public | function | Returns the form handling class for this expression. | 1 | 
| ExpressionInterface::getLabel | public | function | The label of this expression element that can be shown in the UI. | 1 | 
| ExpressionInterface::getRoot | public | function | Returns the root expression if this expression is nested. | 1 | 
| ExpressionInterface::getUuid | public | function | Returns the UUID of this expression if it is nested in another expression. | 1 | 
| ExpressionInterface::getWeight | public | function | Returns the list order of this expression. | 1 | 
| ExpressionInterface::prepareExecutionMetadataState | public | function | Prepares the execution metadata state by adding metadata to it. | 4 | 
| ExpressionInterface::setRoot | public | function | Set the root expression for this expression if it is nested. | 1 | 
| ExpressionInterface::setUuid | public | function | Sets the UUID of this expression in an expression tree. | 1 | 
| ExpressionInterface::setWeight | public | function | Sets the list order of this expression in an expression tree. | 1 | 
| PluginInspectionInterface::getPluginDefinition | public | function | Gets the definition of the plugin implementation. | 4 | 
| PluginInspectionInterface::getPluginId | public | function | Gets the plugin_id of the plugin instance. | 2 |