You are here

ElementProcessorBase.php in Cookie Content Blocker 8

File

src/ElementProcessor/ElementProcessorBase.php
View source
<?php

namespace Drupal\cookie_content_blocker\ElementProcessor;

use Drupal\cookie_content_blocker\ElementProcessorInterface;
use Drupal\Core\Security\TrustedCallbackInterface;

/**
 * Class ElementProcessorBase.
 *
 * A base for Cookie content blocker element processors.
 *
 * @package Drupal\cookie_content_blocker\ElementProcessor
 */
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',
    ];
  }

}

Classes

Namesort descending Description
ElementProcessorBase Class ElementProcessorBase.