standard.install
Install, update and uninstall functions for the standard installation profile.
File
- 
              core/
profiles/ standard/ standard.install  
View source
<?php
/**
 * @file
 * Install, update and uninstall functions for the standard installation 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() {
  // 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();
}
Functions
| Title | Deprecated | Summary | 
|---|---|---|
| standard_install | Implements hook_install(). | 
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.