page_manager_migration-1.0.x-dev/tests/fixtures/pm-panels-export/menu_custom.php
tests/fixtures/pm-panels-export/menu_custom.php
<?php
// phpcs:ignoreFile
/**
* @file
* A database agnostic dump for testing purposes.
*
* This file was generated by the Drupal 9.3.4 db-tools.php script.
*/
use Drupal\Core\Database\Database;
$connection = Database::getConnection();
// Ensure any tables with a serial column with a value of 0 are created as
// expected.
if ($connection->databaseType() === 'mysql') {
$sql_mode = $connection->query("SELECT @@sql_mode;")->fetchField();
$connection->query("SET sql_mode = '$sql_mode,NO_AUTO_VALUE_ON_ZERO'");
}
$connection->schema()->createTable('menu_custom', array(
'fields' => array(
'menu_name' => array(
'type' => 'varchar',
'not null' => TRUE,
'length' => '32',
'default' => '',
),
'title' => array(
'type' => 'varchar',
'not null' => TRUE,
'length' => '255',
'default' => '',
),
'description' => array(
'type' => 'text',
'not null' => FALSE,
'size' => 'normal',
),
),
'primary key' => array(
'menu_name',
),
'mysql_character_set' => 'utf8',
));
$connection->insert('menu_custom')
->fields(array(
'menu_name',
'title',
'description',
))
->values(array(
'menu_name' => 'main-menu',
'title' => 'Main menu',
'description' => 'The <em>Main</em> menu is used on many sites to show the major sections of the site, often in a top navigation bar.',
))
->values(array(
'menu_name' => 'management',
'title' => 'Management',
'description' => 'The <em>Management</em> menu contains links for administrative tasks.',
))
->values(array(
'menu_name' => 'navigation',
'title' => 'Navigation',
'description' => 'The <em>Navigation</em> menu contains links intended for site visitors. Links are added to the <em>Navigation</em> menu automatically by some modules.',
))
->values(array(
'menu_name' => 'user-menu',
'title' => 'User menu',
'description' => "The <em>User</em> menu contains links related to the user's account, as well as the 'Log out' link.",
))
->execute();
// Reset the SQL mode.
if ($connection->databaseType() === 'mysql') {
$connection->query("SET sql_mode = '$sql_mode'");
}