403Webshell
Server IP : 3.147.158.171  /  Your IP : 216.73.216.216
Web Server : Apache/2.4.67 (Amazon Linux) OpenSSL/3.5.5
System : Linux ip-172-31-2-178.us-east-2.compute.internal 6.1.172-216.329.amzn2023.x86_64 #1 SMP PREEMPT_DYNAMIC Wed May 20 06:31:34 UTC 2026 x86_64
User : ec2-user ( 1000)
PHP Version : 8.4.21
Disable Function : NONE
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : OFF  |  Sudo : ON  |  Pkexec : OFF
Directory :  /tsai/repo/drupal/web/core/profiles/demo_umami/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /tsai/repo/drupal/web/core/profiles/demo_umami/demo_umami.install
<?php

/**
 * @file
 * Install, update and uninstall functions for the demo_umami installation profile.
 */

use Drupal\shortcut\Entity\Shortcut;

/**
 * Implements hook_requirements().
 */
function demo_umami_requirements($phase) {
  $requirements = [];
  if ($phase == 'runtime') {
    $profile = \Drupal::installProfile();
    $info = \Drupal::service('extension.list.profile')->getExtensionInfo($profile);
    $requirements['experimental_profile_used'] = [
      'title' => t('Experimental installation profile used'),
      'value' => $info['name'],
      'description' => t('Experimental profiles are provided for testing purposes only. Use at your own risk. To start building a new site, reinstall Drupal and choose a non-experimental profile.'),
      'severity' => REQUIREMENT_WARNING,
    ];
  }
  return $requirements;
}

/**
 * Implements hook_install().
 *
 * Perform actions to set up the site for this profile.
 *
 * @see system_install()
 */
function demo_umami_install() {
  // We install some menu links, so we have to rebuild the router, to ensure the
  // menu links are valid.
  \Drupal::service('router.builder')->rebuildIfNeeded();

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

  // Enable the demo content module. This can't be specified as a dependency
  // in the demo_umami.info.yml file, as it requires configuration provided by
  // the profile (fields etc.).
  \Drupal::service('module_installer')->install(['demo_umami_content'], TRUE);
}

Youez - 2016 - github.com/yon3zu
LinuXploit