function ConditionExpressionContainer::getConfiguration

Overrides ExpressionBase::getConfiguration

File

src/Engine/ConditionExpressionContainer.php, line 106

Class

ConditionExpressionContainer
Container for conditions.

Namespace

Drupal\rules\Engine

Code

public function getConfiguration() {
    $configuration = parent::getConfiguration();
    // We need to update the configuration in case conditions have been added or
    // changed.
    $configuration['conditions'] = [];
    // Use the iterator, which sorts the conditions by weight.
    foreach ($this as $condition) {
        $configuration['conditions'][] = $condition->getConfiguration();
    }
    return $configuration;
}