You are here

class DummyCacheContext in Entity Browser 8

Same name and namespace in other branches
  1. 8.2 tests/modules/entity_browser_test/src/Cache/Context/DummyCacheContext.php \Drupal\entity_browser_test\Cache\Context\DummyCacheContext

Dummy cache context for Entity browser test purposes.

Cache context ID: 'eb_dummy'.

Hierarchy

Expanded class hierarchy of DummyCacheContext

1 string reference to 'DummyCacheContext'
entity_browser_test.services.yml in tests/modules/entity_browser_test/entity_browser_test.services.yml
tests/modules/entity_browser_test/entity_browser_test.services.yml
1 service uses DummyCacheContext
cache_context.eb_dummy in tests/modules/entity_browser_test/entity_browser_test.services.yml
Drupal\entity_browser_test\Cache\Context\DummyCacheContext

File

tests/modules/entity_browser_test/src/Cache/Context/DummyCacheContext.php, line 13

Namespace

Drupal\entity_browser_test\Cache\Context
View source
class DummyCacheContext implements CacheContextInterface {

  /**
   * {@inheritdoc}
   */
  public static function getLabel() {
    return t('Dummy context');
  }

  /**
   * {@inheritdoc}
   */
  public function getContext() {
    return "dummy";
  }

  /**
   * {@inheritdoc}
   */
  public function getCacheableMetadata() {
    return new CacheableMetadata();
  }

}

Members

Namesort descending Modifiers Type Description Overrides
DummyCacheContext::getCacheableMetadata public function Gets the cacheability metadata for the context. Overrides CacheContextInterface::getCacheableMetadata
DummyCacheContext::getContext public function Returns the string representation of the cache context. Overrides CacheContextInterface::getContext
DummyCacheContext::getLabel public static function Returns the label of the cache context. Overrides CacheContextInterface::getLabel