block.install

Same filename in other branches
  1. 7.x modules/block/block.install
  2. 8.9.x core/modules/block/block.install
  3. 10 core/modules/block/block.install
  4. 11.x core/modules/block/block.install

Contains install and update functions for Block.

File

core/modules/block/block.install

View source
<?php


/**
 * @file
 * Contains install and update functions for Block.
 */
use Drupal\Core\Cache\Cache;

/**
 * Implements hook_install().
 */
function block_install() {
    // Because the Block module upon installation unconditionally overrides all
    // HTML output by selecting a different page display variant, we must
    // invalidate all cached HTML output.
    Cache::invalidateTags([
        'rendered',
    ]);
}

/**
 * Implements hook_update_last_removed().
 */
function block_update_last_removed() {
    return 8003;
}

Functions

Title Deprecated Summary
block_install Implements hook_install().
block_update_last_removed Implements hook_update_last_removed().

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.