Skip to main content
Drupal API
User account menu
  • Log in

Breadcrumb

  1. Drupal Core 11.1.x

ContextDefinitionInterface.php

Same filename in this branch
  1. 11.1.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.

API Navigation

  • Drupal Core 11.1.x
  • Topics
  • Classes
  • Functions
  • Constants
  • Globals
  • Files
  • Namespaces
  • Deprecated
  • Services
RSS feed
Powered by Drupal