You are here

DomainBlockBase.php in Domain Access 8

File

domain/src/Plugin/Block/DomainBlockBase.php
View source
<?php

namespace Drupal\domain\Plugin\Block;

use Drupal\Core\Block\BlockBase;

/**
 * Creates a common block pattern for caching.
 */
abstract class DomainBlockBase extends BlockBase {

  /**
   * {@inheritdoc}
   */
  public function getCacheContexts() {

    // By default, all domain blocks are per-url.
    return [
      'url',
    ];
  }

}

Classes

Namesort descending Description
DomainBlockBase Creates a common block pattern for caching.