Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- abstract class BlockBase extends PluginBase implements BlockPluginInterface {
- /**
- * Returns generic default configuration for block plugins.
- *
- * @return array
- * An associative array with the default configuration.
- */
- protected function baseConfigurationDefaults() {
- return array(
- 'label' => '',
- 'module' => $this->pluginDefinition['module'],
- 'label_display' => BlockInterface::BLOCK_LABEL_VISIBLE,
- 'cache' => array(
- 'max_age' => 0,
- ),
- );
- }
- }
- DRUPAL_NO_CACHE (equivalent: cache.max_age = 0)
- DRUPAL_CACHE_CUSTOM (equivalent: cache.max_age = 0 + Cache::keyFromQuery())
- DRUPAL_CACHE_PER_ROLE (equivalent: cache.max_age >0 + user.roles)
- DRUPAL_CACHE_PER_USER (equivalent: cache.max_age >0 + user)
- DRUPAL_CACHE_PER_PAGE (equivalent: cache.max_age >0 + url)
- DRUPAL_CACHE_GLOBAL (equivalent: cache.max_age >0, no cache contexts)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement