Loading .gitlab-ci.yml +2 −2 Original line number Diff line number Diff line Loading @@ -11,8 +11,8 @@ workflow: variables: PHP_VERSION: "8.1" # @TODO unit testing... TEST_DIRECTORIES: "core/tests/Drupal/KernelTests/Core/Recipe core/tests/Drupal/FunctionalTests/Core/Recipe" CODE_DIRECTORIES: "core/lib/Drupal/Core/Recipe/" TEST_DIRECTORIES: "core/tests/Drupal/KernelTests/Core/Recipe core/tests/Drupal/FunctionalTests/Core/Recipe core/tests/Drupal/KernelTests/Core/Config/Action" CODE_DIRECTORIES: "core/lib/Drupal/Core/Recipe core/lib/Drupal/Core/Config/Action" default: image: skpr/php-circleci:${PHP_VERSION}-v2-latest Loading core/core.services.yml +3 −0 Original line number Diff line number Diff line Loading @@ -50,6 +50,9 @@ parameters: supportsCredentials: false tempstore.expire: 604800 services: plugin.manager.config_action: class: Drupal\Core\Config\Action\ConfigActionManager parent: default_plugin_manager # Simple cache contexts, directly derived from the request context. cache_context.ip: class: Drupal\Core\Cache\Context\IpCacheContext Loading core/lib/Drupal/Core/Config/Action/Annotation/ConfigAction.php 0 → 100644 +32 −0 Original line number Diff line number Diff line <?php namespace Drupal\Core\Config\Action\Annotation; use Drupal\Component\Annotation\Plugin; /** * Defines a ConfigAction annotation object. * * @ingroup config_action_api * * @Annotation */ class ConfigAction extends Plugin { /** * The plugin ID. * * @var string */ public $id; /** * The administrative label of the config action. * * @var \Drupal\Core\Annotation\Translation|string * * @ingroup plugin_translatable */ public $admin_label = ''; } core/lib/Drupal/Core/Config/Action/Attribute/ActionMethod.php 0 → 100644 +24 −0 Original line number Diff line number Diff line <?php namespace Drupal\Core\Config\Action\Attribute; use Drupal\Core\Config\Action\Exists; use Drupal\Core\StringTranslation\TranslatableMarkup; /** * @internal * This API is experimental. */ #[\Attribute(\Attribute::TARGET_METHOD)] final class ActionMethod { /** * @param \Drupal\Core\Config\Action\Exists $exists * Determines behavior of action depending on entity existence. * @param \Drupal\Core\StringTranslation\TranslatableMarkup|string $adminLabel * The admin label for the user interface. */ public function __construct(public readonly Exists $exists = Exists::ERROR_IF_NOT_EXISTS, public readonly TranslatableMarkup|string $adminLabel = '') { } } core/lib/Drupal/Core/Config/Action/ConfigActionException.php 0 → 100644 +10 −0 Original line number Diff line number Diff line <?php namespace Drupal\Core\Config\Action; /** * @internal * This API is experimental. */ final class ConfigActionException extends \RuntimeException { } Loading
.gitlab-ci.yml +2 −2 Original line number Diff line number Diff line Loading @@ -11,8 +11,8 @@ workflow: variables: PHP_VERSION: "8.1" # @TODO unit testing... TEST_DIRECTORIES: "core/tests/Drupal/KernelTests/Core/Recipe core/tests/Drupal/FunctionalTests/Core/Recipe" CODE_DIRECTORIES: "core/lib/Drupal/Core/Recipe/" TEST_DIRECTORIES: "core/tests/Drupal/KernelTests/Core/Recipe core/tests/Drupal/FunctionalTests/Core/Recipe core/tests/Drupal/KernelTests/Core/Config/Action" CODE_DIRECTORIES: "core/lib/Drupal/Core/Recipe core/lib/Drupal/Core/Config/Action" default: image: skpr/php-circleci:${PHP_VERSION}-v2-latest Loading
core/core.services.yml +3 −0 Original line number Diff line number Diff line Loading @@ -50,6 +50,9 @@ parameters: supportsCredentials: false tempstore.expire: 604800 services: plugin.manager.config_action: class: Drupal\Core\Config\Action\ConfigActionManager parent: default_plugin_manager # Simple cache contexts, directly derived from the request context. cache_context.ip: class: Drupal\Core\Cache\Context\IpCacheContext Loading
core/lib/Drupal/Core/Config/Action/Annotation/ConfigAction.php 0 → 100644 +32 −0 Original line number Diff line number Diff line <?php namespace Drupal\Core\Config\Action\Annotation; use Drupal\Component\Annotation\Plugin; /** * Defines a ConfigAction annotation object. * * @ingroup config_action_api * * @Annotation */ class ConfigAction extends Plugin { /** * The plugin ID. * * @var string */ public $id; /** * The administrative label of the config action. * * @var \Drupal\Core\Annotation\Translation|string * * @ingroup plugin_translatable */ public $admin_label = ''; }
core/lib/Drupal/Core/Config/Action/Attribute/ActionMethod.php 0 → 100644 +24 −0 Original line number Diff line number Diff line <?php namespace Drupal\Core\Config\Action\Attribute; use Drupal\Core\Config\Action\Exists; use Drupal\Core\StringTranslation\TranslatableMarkup; /** * @internal * This API is experimental. */ #[\Attribute(\Attribute::TARGET_METHOD)] final class ActionMethod { /** * @param \Drupal\Core\Config\Action\Exists $exists * Determines behavior of action depending on entity existence. * @param \Drupal\Core\StringTranslation\TranslatableMarkup|string $adminLabel * The admin label for the user interface. */ public function __construct(public readonly Exists $exists = Exists::ERROR_IF_NOT_EXISTS, public readonly TranslatableMarkup|string $adminLabel = '') { } }
core/lib/Drupal/Core/Config/Action/ConfigActionException.php 0 → 100644 +10 −0 Original line number Diff line number Diff line <?php namespace Drupal\Core\Config\Action; /** * @internal * This API is experimental. */ final class ConfigActionException extends \RuntimeException { }