Initial Drupal 11 with DDEV setup

This commit is contained in:
gluebox
2025-10-08 11:39:17 -04:00
commit 89ef74b305
25344 changed files with 2599172 additions and 0 deletions

View File

@ -0,0 +1,34 @@
<?php
declare(strict_types=1);
namespace com\example\PluginNamespace;
use Drupal\Component\Plugin\Attribute\Plugin;
/**
* Custom plugin attribute.
*/
#[\Attribute(\Attribute::TARGET_CLASS)]
class CustomPlugin extends Plugin {
/**
* Constructs a CustomPlugin attribute object.
*
* @param string $id
* The attribute class ID.
* @param string $title
* The title.
*/
public function __construct(
public readonly string $id,
public readonly string $title,
) {}
}
/**
* Custom plugin attribute.
*/
#[\Attribute(\Attribute::TARGET_CLASS)]
class CustomPlugin2 extends Plugin {}

View File

@ -0,0 +1,19 @@
<?php
declare(strict_types=1);
namespace com\example\PluginNamespace;
use Drupal\Component\Plugin\Attribute\Plugin;
/**
* Provides a custom test plugin.
*/
#[Plugin(
id: "discovery_test_1",
)]
#[CustomPlugin(
id: "discovery_test_1",
title: "Discovery test plugin"
)]
class AttributeDiscoveryTest1 {}

View File

@ -0,0 +1,16 @@
<?php
declare(strict_types=1);
namespace com\example\PluginNamespace;
use Drupal\a_module_that_does_not_exist\Plugin\Custom;
/**
* Provides a custom test plugin that extends from a missing dependency.
*/
#[CustomPlugin(
id: "discovery_test_2",
title: "Discovery test plugin 2"
)]
class AttributeDiscoveryTest2 extends Custom {}

View File

@ -0,0 +1,16 @@
<?php
declare(strict_types=1);
namespace com\example\PluginNamespace;
use Drupal\a_module_that_does_not_exist\Plugin\CustomInterface;
/**
* Provides a custom test plugin that implements a missing interface.
*/
#[CustomPlugin(
id: "discovery_test_missing_interface",
title: "Discovery test plugin missing interface"
)]
class AttributeDiscoveryTestMissingInterface implements CustomInterface {}

View File

@ -0,0 +1,19 @@
<?php
declare(strict_types=1);
namespace com\example\PluginNamespace;
use Drupal\a_module_that_does_not_exist\Plugin\CustomTrait;
/**
* Provides a custom test plugin that uses a missing trait.
*/
#[CustomPlugin(
id: "discovery_test_missing_trait",
title: "Discovery test plugin missing trait"
)]
class AttributeDiscoveryTestMissingTrait {
use CustomTrait;
}