block_place.install 1.1 KB

12345678910111213141516171819202122232425262728293031323334
  1. <?php
  2. /**
  3. * @file
  4. * Contains install and update functions for Place Blocks.
  5. */
  6. /**
  7. * Implements hook_requirements().
  8. */
  9. function block_place_requirements($phase) {
  10. $requirements = [];
  11. // Notify about the module being deprecated.
  12. if ($phase == 'runtime') {
  13. $requirements['block_place'] = [
  14. 'title' => t('Place blocks'),
  15. 'severity' => REQUIREMENT_INFO,
  16. 'description' => t('Place Blocks (Core, Experimental) is deprecated in Drupal 8.8.0 and will be removed in Drupal 9.0.0. See <a href=":change-record">See the change record for a list of alternatives</a>.', [
  17. ':change-record' => 'https://www.drupal.org/node/3081957',
  18. ]),
  19. ];
  20. }
  21. return $requirements;
  22. }
  23. /**
  24. * Implements hook_install().
  25. */
  26. function block_place_install() {
  27. \Drupal::messenger()->addWarning(t('Place Blocks (Core, Experimental) is deprecated in Drupal 8.8.0 and will be removed in Drupal 9.0.0. See the change record for a list of alternatives. See <a href=":change-record">the change record</a>.', [
  28. ':change-record' => 'https://www.drupal.org/node/3081957',
  29. ]));
  30. }