protected function Block::getCacheType

Provide a single method to figure caching type, keeping a sensible default for when it's unset.

2 calls to Block::getCacheType()
Block::buildOptionsForm in drupal/core/modules/block/lib/Drupal/block/Plugin/views/display/Block.php
Provide the default form for setting options.
Block::executeHookBlockList in drupal/core/modules/block/lib/Drupal/block/Plugin/views/display/Block.php
The default block handler doesn't support configurable items, but extended block handlers might be able to do interesting stuff with it.

File

drupal/core/modules/block/lib/Drupal/block/Plugin/views/display/Block.php, line 142
Definition of Drupal\views\Plugin\views\display\Block. Definition of Drupal\block\Plugin\views\display\Block.

Class

Block
The plugin that handles a block.

Namespace

Drupal\block\Plugin\views\display

Code

protected function getCacheType() {
  $cache_type = $this
    ->getOption('block_caching');
  if (empty($cache_type)) {
    $cache_type = DRUPAL_NO_CACHE;
  }
  return $cache_type;
}