ContextDefinitionInterface.php

Same filename in this branch
  1. 8.9.x core/lib/Drupal/Component/Plugin/Context/ContextDefinitionInterface.php
Same filename in other branches
  1. 9 core/lib/Drupal/Core/Plugin/Context/ContextDefinitionInterface.php
  2. 9 core/lib/Drupal/Component/Plugin/Context/ContextDefinitionInterface.php
  3. 10 core/lib/Drupal/Core/Plugin/Context/ContextDefinitionInterface.php
  4. 10 core/lib/Drupal/Component/Plugin/Context/ContextDefinitionInterface.php
  5. 11.x core/lib/Drupal/Core/Plugin/Context/ContextDefinitionInterface.php
  6. 11.x core/lib/Drupal/Component/Plugin/Context/ContextDefinitionInterface.php

Namespace

Drupal\Core\Plugin\Context

File

core/lib/Drupal/Core/Plugin/Context/ContextDefinitionInterface.php

View source
<?php

namespace Drupal\Core\Plugin\Context;

use Drupal\Component\Plugin\Context\ContextDefinitionInterface as ComponentContextDefinitionInterface;

/**
 * Interface to define definition objects in ContextInterface via TypedData.
 *
 * @see \Drupal\Component\Plugin\Context\ContextDefinitionInterface
 * @see \Drupal\Core\Plugin\Context\ContextInterface
 */
interface ContextDefinitionInterface extends ComponentContextDefinitionInterface {
    
    /**
     * Returns the data definition of the defined context.
     *
     * @return \Drupal\Core\TypedData\DataDefinitionInterface
     *   The data definition object.
     */
    public function getDataDefinition();
    
    /**
     * Determines if this definition is satisfied by a context object.
     *
     * @param \Drupal\Core\Plugin\Context\ContextInterface $context
     *   The context object.
     *
     * @return bool
     *   TRUE if this definition is satisfiable by the context object, FALSE
     *   otherwise.
     */
    public function isSatisfiedBy(ContextInterface $context);

}

Interfaces

Title Deprecated Summary
ContextDefinitionInterface Interface to define definition objects in ContextInterface via TypedData.

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.