Verified Commit 8c404c87 authored by Lee Rowlands's avatar Lee Rowlands
Browse files

Revert "Issue #3062281 by rpsu, acbramley, xjm, catch, Berdir: Deprecate and...

Revert "Issue #3062281 by rpsu, acbramley, xjm, catch, Berdir: Deprecate and remove block_place module in Drupal 9"

This reverts commit 2c2ac0d9.
parent 9094ab81
Loading
Loading
Loading
Loading
+1 −1
Changes for core/modules/block_place/block_place.info.yml: 1 added line, 1 removed line.
Original line number Diff line number Diff line
name: Place Blocks
type: module
description: 'Allow administrators to place blocks from any Drupal page. This module is deprecated in Drupal 8.8.0 and will be removed in Drupal 9.0.0. Using Layout Builder (available in Drupal 8.7.0) module is recommended. See https://www.drupal.org/node/3081957. Alternatively you may use the contrib module Place Blocks.'
description: 'Allow administrators to place blocks from any Drupal page'
package: Core (Experimental)
version: VERSION
core: 8.x
+0 −36
Changes for core/modules/block_place/block_place.install: 0 added lines, 36 removed lines.
Original line number Diff line number Diff line
<?php

/**
 * @file
 * Contains install and update functions for Place Blocks.
 */

/**
 * Implements hook_requirements().
 */
function block_place_requirements($phase) {
  $requirements = [];
  // Notify about the module being deprecated.
  if ($phase == 'runtime') {
    $requirements['block_place'] = [
      'title' => t('Place blocks'),
      'severity' => REQUIREMENT_INFO,
      'description' => t('Place Blocks (Core, Experimental) is deprecated in Drupal 8.8.0 and  will be removed in Drupal 9.0.0. Using Layout Builder (available in Drupal 8.7.0) module is recommended. See <a href=":change-record">the change record</a>. Alternatively you may use the contrib module <a href=":contrib-link">Place Blocks</a>.', [
        ':change-record' => 'https://www.drupal.org/node/3081957',
        ':contrib-link' => 'https://www.drupal.org/project/block_place',
      ]),
    ];
  }

  return $requirements;
}

/**
 * Implements hook_install().
 */
function block_place_install() {
  \Drupal::messenger()->addWarning(t('Place Blocks (Core, Experimental) is deprecated in Drupal 8.8.0 and  will be removed in Drupal 9.0.0. Using Layout Builder (available in Drupal 8.7.0) module is recommended. See <a href=":change-record">the change record</a>. Alternatively you may use the contrib module <a href=":contrib-link">Place Block</a>.', [
    ':change-record' => 'https://www.drupal.org/node/3081957',
    ':contrib-link' => 'https://www.drupal.org/project/block_place',
  ]));
}
+0 −2
Changes for core/modules/block_place/block_place.libraries.yml: 0 added lines, 2 removed lines.
Original line number Diff line number Diff line
@@ -3,11 +3,9 @@ drupal.block_place:
  css:
    theme:
      css/block-place.css: {}
  deprecated: The "%library_id%" asset is deprecated in drupal:8.8.0 and will be removed in drupal:9.0.0. Using Layout Builder (available in drupal:8.7.0) module is recommended. See https://www.drupal.org/node/3081957. Alternatively you may use the contrib module Place Blocks.

drupal.block_place.icons:
  version: VERSION
  css:
    theme:
      css/block-place.icons.theme.css: {}
  deprecated: The "%library_id%" asset is deprecated in drupal:8.8.0 and will be removed in drupal:9.0.0. Using Layout Builder (available in drupal:8.7.0) module is recommended. See https://www.drupal.org/node/3081957. Alternatively you may use the contrib module Place Blocks.
+0 −15
Changes for core/modules/block_place/block_place.module: 0 added lines, 15 removed lines.
Original line number Diff line number Diff line
@@ -3,19 +3,8 @@
/**
 * @file
 * Controls the placement of blocks from all pages.
 *
 * @deprecated in drupal:8.8.0 and is removed from drupal:9.0.0.
 *   See each function in the file for individual deprecation notices with
 *   upgrade instructions.
 *
 * @see https://www.drupal.org/node/3081957
 */

@trigger_error('The Place Blocks module is deprecated in drupal:8.8.0 and is removed
  from drupal:9.0.0. Using Layout Builder (available in Drupal 8.7.0) module is
  recommended. See https://www.drupal.org/node/3081957. Alternatively you may use
  the contrib module Place Blocks.', E_USER_DEPRECATED);

use Drupal\Core\Routing\RouteMatchInterface;
use Drupal\Core\Url;

@@ -26,10 +15,6 @@ function block_place_help($route_name, RouteMatchInterface $route_match) {
  switch ($route_name) {
    case 'help.page.block_place':
      $output = '<h3>' . t('About') . '</h3>';
      $output .= '<p><strong>' . t('Place Blocks (Core, Experimental) is deprecated in Drupal 8.8.0 and  will be removed in Drupal 9.0.0. Using Layout Builder (available in Drupal 8.7.0) module is recommended. See <a href=":change-record">the change record</a>. Alternatively you may use the contrib module <a href=":contrib-link">Place Blocks</a>.', [
          ':change-record' => 'https://www.drupal.org/node/3081957',
          ':contrib-link' => 'https://www.drupal.org/project/block_place',
        ]) . '</strong></p>';
      $output .= '<p>' . t('The Place Blocks module allows you to place blocks from every page. For more information, see the <a href=":blocks-documentation">online documentation for the Place Blocks module</a>.', [':blocks-documentation' => 'https://www.drupal.org/documentation/modules/block_place/']) . '</p>';
      $output .= '<h3>' . t('Uses') . '</h3>';
      $output .= '<p>' . t('Block placement is specific to each theme on your site. This module allows you to place blocks in the context of your content pages.') . '</p>';
+0 −1
Changes for core/modules/block_place/block_place.services.yml: 0 added lines, 1 removed line.
Original line number Diff line number Diff line
@@ -4,4 +4,3 @@ services:
    arguments: ['@request_stack', '@current_user']
    tags:
      - { name: event_subscriber }
    deprecated: The "%service_id%" service is deprecated in drupal:8.8.0 and will be removed in drupal:9.0.0. Using Layout Builder (available in drupal:8.7.0) module is recommended. See https://www.drupal.org/node/3081957. Alternatively you may use the contrib module Place Blocks.
Loading