clean install

This commit is contained in:
2024-12-10 15:08:16 +01:00
commit e14eb2d8fd
31193 changed files with 3555714 additions and 0 deletions

View File

@@ -0,0 +1,5 @@
name: 'Disable user toolbar'
type: module
description: 'Support module for testing toolbar without user toolbar'
package: Testing
version: VERSION

View File

@@ -0,0 +1,13 @@
<?php
/**
* @file
* Test module.
*/
/**
* Implements hook_toolbar_alter().
*/
function toolbar_disable_user_toolbar_toolbar_alter(&$items) {
unset($items['user']);
}

View File

@@ -0,0 +1,5 @@
name: 'Toolbar module API tests'
type: module
description: 'Support module for toolbar testing.'
package: Testing
version: VERSION

View File

@@ -0,0 +1,64 @@
<?php
/**
* @file
* A dummy module to test API interaction with the Toolbar module.
*/
use Drupal\Core\Link;
use Drupal\Core\Url;
/**
* Implements hook_toolbar().
*/
function toolbar_test_toolbar() {
$items['testing'] = [
'#type' => 'toolbar_item',
'tab' => [
'#type' => 'link',
'#title' => t('Test tab'),
'#url' => Url::fromRoute('<front>'),
'#options' => [
'attributes' => [
'id' => 'toolbar-tab-testing',
'title' => t('Test tab'),
],
],
],
'tray' => [
'#heading' => t('Test tray'),
'#wrapper_attributes' => [
'id' => 'toolbar-tray-testing',
],
'content' => [
'#theme' => 'item_list',
'#items' => [
Link::fromTextAndUrl(t('link 1'), Url::fromRoute('<front>', [], ['attributes' => ['title' => 'Test link 1 title']]))->toRenderable(),
Link::fromTextAndUrl(t('link 2'), Url::fromRoute('<front>', [], ['attributes' => ['title' => 'Test link 2 title']]))->toRenderable(),
Link::fromTextAndUrl(t('link 3'), Url::fromRoute('<front>', [], ['attributes' => ['title' => 'Test link 3 title']]))->toRenderable(),
],
'#attributes' => [
'class' => ['toolbar-menu'],
],
],
],
'#weight' => 50,
];
$items['empty'] = [
'#type' => 'toolbar_item',
];
return $items;
}
/**
* Implements hook_preprocess_HOOK().
*/
function toolbar_test_preprocess_menu(&$variables) {
// All the standard hook_theme variables should be populated when the
// Toolbar module is rendering a menu.
foreach (['menu_name', 'items', 'attributes'] as $variable) {
$variables[$variable];
}
}