Initial Drupal 11 with DDEV setup
This commit is contained in:
		
							
								
								
									
										34
									
								
								web/core/profiles/standard/standard.install
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										34
									
								
								web/core/profiles/standard/standard.install
									
									
									
									
									
										Normal file
									
								
							@ -0,0 +1,34 @@
 | 
			
		||||
<?php
 | 
			
		||||
 | 
			
		||||
/**
 | 
			
		||||
 * @file
 | 
			
		||||
 * Install, update and uninstall functions for the standard profile.
 | 
			
		||||
 */
 | 
			
		||||
 | 
			
		||||
use Drupal\shortcut\Entity\Shortcut;
 | 
			
		||||
 | 
			
		||||
/**
 | 
			
		||||
 * Implements hook_install().
 | 
			
		||||
 *
 | 
			
		||||
 * Perform actions to set up the site for this profile.
 | 
			
		||||
 *
 | 
			
		||||
 * @see system_install()
 | 
			
		||||
 */
 | 
			
		||||
function standard_install(): void {
 | 
			
		||||
  // Populate the default shortcut set.
 | 
			
		||||
  $shortcut = Shortcut::create([
 | 
			
		||||
    'shortcut_set' => 'default',
 | 
			
		||||
    'title' => t('Add content'),
 | 
			
		||||
    'weight' => -20,
 | 
			
		||||
    'link' => ['uri' => 'internal:/node/add'],
 | 
			
		||||
  ]);
 | 
			
		||||
  $shortcut->save();
 | 
			
		||||
 | 
			
		||||
  $shortcut = Shortcut::create([
 | 
			
		||||
    'shortcut_set' => 'default',
 | 
			
		||||
    'title' => t('All content'),
 | 
			
		||||
    'weight' => -19,
 | 
			
		||||
    'link' => ['uri' => 'internal:/admin/content'],
 | 
			
		||||
  ]);
 | 
			
		||||
  $shortcut->save();
 | 
			
		||||
}
 | 
			
		||||
		Reference in New Issue
	
	Block a user