26 lines
		
	
	
		
			521 B
		
	
	
	
		
			PHP
		
	
	
	
	
	
		
		
			
		
	
	
			26 lines
		
	
	
		
			521 B
		
	
	
	
		
			PHP
		
	
	
	
	
	
| 
								 | 
							
								<?php
							 | 
						||
| 
								 | 
							
								
							 | 
						||
| 
								 | 
							
								/**
							 | 
						||
| 
								 | 
							
								 * @file
							 | 
						||
| 
								 | 
							
								 * Contains install and update functions for Block.
							 | 
						||
| 
								 | 
							
								 */
							 | 
						||
| 
								 | 
							
								
							 | 
						||
| 
								 | 
							
								use Drupal\Core\Cache\Cache;
							 | 
						||
| 
								 | 
							
								
							 | 
						||
| 
								 | 
							
								/**
							 | 
						||
| 
								 | 
							
								 * Implements hook_install().
							 | 
						||
| 
								 | 
							
								 */
							 | 
						||
| 
								 | 
							
								function block_install(): void {
							 | 
						||
| 
								 | 
							
								  // 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(): int {
							 | 
						||
| 
								 | 
							
								  return 8003;
							 | 
						||
| 
								 | 
							
								}
							 |