You are here

public function RuleExpression::deleteExpression in Rules 8.3

Deletes an expression identified by the specified UUID in the container.

Parameters

string $uuid: The UUID of the expression.

Return value

bool TRUE if an expression was deleted, FALSE if no expression with that UUID was found.

Overrides ExpressionContainerInterface::deleteExpression

File

src/Plugin/RulesExpression/RuleExpression.php, line 232

Class

RuleExpression
Provides a rule, executing actions when conditions are met.

Namespace

Drupal\rules\Plugin\RulesExpression

Code

public function deleteExpression($uuid) {
  $deleted = $this->conditions
    ->deleteExpression($uuid);
  if (!$deleted) {
    $deleted = $this->actions
      ->deleteExpression($uuid);
  }
  return $deleted;
}