Loading src/Engine/ExpressionPluginManager.php +5 −29 Original line number Diff line number Diff line Loading @@ -33,26 +33,14 @@ class ExpressionPluginManager extends DefaultPluginManager { } /** * Creates a new rule. * * @param array $configuration * The configuration array to create the plugin instance with. * * @return \Drupal\rules\Plugin\RulesExpression\RuleInterface * The created rule. * {@inheritdoc} */ public function createRule(array $configuration = []) { return $this->createInstance('rules_rule', $configuration); } /** * Creates a new action expression. * * @param string $id * The action plugin id. * * @return \Drupal\rules\Core\RulesActionInterface; * The created action. * {@inheritdoc} */ public function createAction($id) { return $this->createInstance('rules_action', [ Loading @@ -61,13 +49,7 @@ class ExpressionPluginManager extends DefaultPluginManager { } /** * Creates a new condition expression. * * @param string $id * The condition plugin id. * * @return \Drupal\rules\Core\RulesConditionInterface * The created condition. * {@inheritdoc} */ public function createCondition($id) { return $this->createInstance('rules_condition', [ Loading @@ -76,20 +58,14 @@ class ExpressionPluginManager extends DefaultPluginManager { } /** * Creates a new 'and' condition container. * * @return \Drupal\rules\Engine\ConditionExpressionContainerInterface * The created 'and' condition container. * {@inheritdoc} */ public function createAnd() { return $this->createInstance('rules_and'); } /** * Creates a new 'or' condition container. * * @return \Drupal\rules\Engine\ConditionExpressionContainerInterface * The created 'or' condition container. * {@inheritdoc} */ public function createOr() { return $this->createInstance('rules_or'); Loading src/Engine/ExpressionPluginManagerInterface.php 0 → 100644 +64 −0 Original line number Diff line number Diff line <?php /** * @file * Contains \Drupal\rules\Engine\ExpressionPluginManagerInterface. */ namespace Drupal\rules\Engine; use Drupal\Component\Plugin\PluginManagerInterface; /** * Defines an interface for Expression Manager plugins. */ interface ExpressionPluginManagerInterface extends PluginManagerInterface { /** * Creates a new rule. * * @param array $configuration * The configuration array to create the plugin instance with. * * @return \Drupal\rules\Plugin\RulesExpression\RuleInterface * The created rule. */ public function createRule(array $configuration = []); /** * Creates a new action expression. * * @param string $id * The action plugin id. * * @return \Drupal\rules\Core\RulesActionInterface; * The created action. */ public function createAction($id); /** * Creates a new condition expression. * * @param string $id * The condition plugin id. * * @return \Drupal\rules\Core\RulesConditionInterface * The created condition. */ public function createCondition($id); /** * Creates a new 'and' condition container. * * @return \Drupal\rules\Engine\ConditionExpressionContainerInterface * The created 'and' condition container. */ public function createAnd(); /** * Creates a new 'or' condition container. * * @return \Drupal\rules\Engine\ConditionExpressionContainerInterface * The created 'or' condition container. */ public function createOr(); } Loading
src/Engine/ExpressionPluginManager.php +5 −29 Original line number Diff line number Diff line Loading @@ -33,26 +33,14 @@ class ExpressionPluginManager extends DefaultPluginManager { } /** * Creates a new rule. * * @param array $configuration * The configuration array to create the plugin instance with. * * @return \Drupal\rules\Plugin\RulesExpression\RuleInterface * The created rule. * {@inheritdoc} */ public function createRule(array $configuration = []) { return $this->createInstance('rules_rule', $configuration); } /** * Creates a new action expression. * * @param string $id * The action plugin id. * * @return \Drupal\rules\Core\RulesActionInterface; * The created action. * {@inheritdoc} */ public function createAction($id) { return $this->createInstance('rules_action', [ Loading @@ -61,13 +49,7 @@ class ExpressionPluginManager extends DefaultPluginManager { } /** * Creates a new condition expression. * * @param string $id * The condition plugin id. * * @return \Drupal\rules\Core\RulesConditionInterface * The created condition. * {@inheritdoc} */ public function createCondition($id) { return $this->createInstance('rules_condition', [ Loading @@ -76,20 +58,14 @@ class ExpressionPluginManager extends DefaultPluginManager { } /** * Creates a new 'and' condition container. * * @return \Drupal\rules\Engine\ConditionExpressionContainerInterface * The created 'and' condition container. * {@inheritdoc} */ public function createAnd() { return $this->createInstance('rules_and'); } /** * Creates a new 'or' condition container. * * @return \Drupal\rules\Engine\ConditionExpressionContainerInterface * The created 'or' condition container. * {@inheritdoc} */ public function createOr() { return $this->createInstance('rules_or'); Loading
src/Engine/ExpressionPluginManagerInterface.php 0 → 100644 +64 −0 Original line number Diff line number Diff line <?php /** * @file * Contains \Drupal\rules\Engine\ExpressionPluginManagerInterface. */ namespace Drupal\rules\Engine; use Drupal\Component\Plugin\PluginManagerInterface; /** * Defines an interface for Expression Manager plugins. */ interface ExpressionPluginManagerInterface extends PluginManagerInterface { /** * Creates a new rule. * * @param array $configuration * The configuration array to create the plugin instance with. * * @return \Drupal\rules\Plugin\RulesExpression\RuleInterface * The created rule. */ public function createRule(array $configuration = []); /** * Creates a new action expression. * * @param string $id * The action plugin id. * * @return \Drupal\rules\Core\RulesActionInterface; * The created action. */ public function createAction($id); /** * Creates a new condition expression. * * @param string $id * The condition plugin id. * * @return \Drupal\rules\Core\RulesConditionInterface * The created condition. */ public function createCondition($id); /** * Creates a new 'and' condition container. * * @return \Drupal\rules\Engine\ConditionExpressionContainerInterface * The created 'and' condition container. */ public function createAnd(); /** * Creates a new 'or' condition container. * * @return \Drupal\rules\Engine\ConditionExpressionContainerInterface * The created 'or' condition container. */ public function createOr(); }