ConstraintConditionInterface.php

Same filename in other branches
  1. 4.0.x src/ConstraintConditionInterface.php

Namespace

Drupal\ctools

File

src/ConstraintConditionInterface.php

View source
<?php

namespace Drupal\ctools;


/**
 * Interface for Constraint Conditions
 */
interface ConstraintConditionInterface {
    
    /**
     * Applies relevant constraints for this condition to the injected contexts.
     *
     * @param \Drupal\Core\Plugin\Context\ContextInterface[] $contexts
     *   Contexts to apply.
     */
    public function applyConstraints(array $contexts = []);
    
    /**
     * Removes constraints for this condition from the injected contexts.
     *
     * @param \Drupal\Core\Plugin\Context\ContextInterface[] $contexts
     *   Contexts to remove.
     */
    public function removeConstraints(array $contexts = []);

}

Interfaces

Title Deprecated Summary
ConstraintConditionInterface Interface for Constraint Conditions