You are here

abstract class ElementProcessorBase in Cookie Content Blocker 8

Class ElementProcessorBase.

A base for Cookie content blocker element processors.

@package Drupal\cookie_content_blocker\ElementProcessor

Hierarchy

Expanded class hierarchy of ElementProcessorBase

File

src/ElementProcessor/ElementProcessorBase.php, line 15

Namespace

Drupal\cookie_content_blocker\ElementProcessor
View source
abstract class ElementProcessorBase implements ElementProcessorInterface, TrustedCallbackInterface {

  /**
   * {@inheritdoc}
   */
  public abstract function applies(array $element) : bool;

  /**
   * {@inheritdoc}
   */
  public abstract function processElement(array $element) : array;

  /**
   * {@inheritdoc}
   */
  public static function trustedCallbacks() : array {
    return [
      'processElement',
    ];
  }

}

Members

Namesort descending Modifiers Type Description Overrides
ElementProcessorBase::applies abstract public function Declares if the route processor applies to the given element. Overrides ElementProcessorInterface::applies 3
ElementProcessorBase::processElement abstract public function Processes the element. Overrides ElementProcessorInterface::processElement 3
ElementProcessorBase::trustedCallbacks public static function Lists the trusted callbacks provided by the implementing class. Overrides TrustedCallbackInterface::trustedCallbacks
TrustedCallbackInterface::THROW_EXCEPTION constant Untrusted callbacks throw exceptions.
TrustedCallbackInterface::TRIGGER_SILENCED_DEPRECATION constant Untrusted callbacks trigger silenced E_USER_DEPRECATION errors.
TrustedCallbackInterface::TRIGGER_WARNING constant Untrusted callbacks trigger E_USER_WARNING errors.