* Contains install and update functions for Place Blocks.
*/
/**
* Implements hook_requirements().
*/
functionblock_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. See <a href=":change-record">See the change record for a list of alternatives</a>.',[
\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>.',[
deprecated:The "%library_id%" asset 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 https://www.drupal.org/node/3081957.
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. See the change record for a list of alternatives. See https://www.drupal.org/node/3081957.
* Controls the placement of blocks from all pages.
*
* @deprecated in drupal:8.8.0 and is removed from drupal:9.0.0. See the
* change record for a list of alternatives.
*
* @see https://www.drupal.org/node/3081957
*/
useDrupal\Core\Routing\RouteMatchInterface;
useDrupal\Core\Url;
@trigger_error('The Place Blocks module is deprecated in drupal:8.8.0 and will be removed from drupal:9.0.0. See the change record for a list of alternatives. See https://www.drupal.org/node/3081957.',E_USER_DEPRECATED);
$output.='<p><strong>'.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>.',[
$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>';
return$output;
}
}
/**
* Implements hook_toolbar().
*/
functionblock_place_toolbar(){
// Link to the current page with a query parameter.
$query=\Drupal::request()->query->all();
$wrapper_class='';
$status_class='';
$description='';
if(isset($query['block-place'])){
$status_class='active';
$wrapper_class='is-active';
$description=t('Exit Place block mode.');
unset($query['block-place']);
unset($query['destination']);
}
else{
$status_class='inactive';
$description=t('Show regions to Place blocks.');
$query['block-place']='1';
// Setting destination is both a work-around for the toolbar "Back to site"
// link in escapeAdmin.js and used for the destination after picking a
deprecated:The "%service_id%" service 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 https://www.drupal.org/node/3081957.
@trigger_error('The '.__NAMESPACE__.'\PlaceBlockPageVariant is deprecated in drupal:8.8.0 and will be removed from drupal:9.0.0. See the change record for a list of alternatives. See https://www.drupal.org/node/3081957.',E_USER_DEPRECATED);