function standard_install

Same name in other branches
  1. 7.x profiles/standard/standard.install \standard_install()
  2. 9 core/profiles/standard/standard.install \standard_install()
  3. 8.9.x core/profiles/standard/standard.install \standard_install()
  4. 11.x core/profiles/standard/standard.install \standard_install()

Implements hook_install().

Perform actions to set up the site for this profile.

See also

system_install()

File

core/profiles/standard/standard.install, line 17

Code

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();
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.