Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
S
styleguide
Manage
Activity
Members
Labels
Plan
Wiki
Custom issue tracker
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Model registry
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
project
styleguide
Merge requests
!28
Converted plugin discovery
Code
Review changes
Check out branch
Download
Patches
Plain diff
Merged
Converted plugin discovery
issue/styleguide-3521835:3521835-plugin-discovery
into
2.x
Overview
0
Commits
2
Pipelines
3
Changes
9
Merged
David Cameron
requested to merge
issue/styleguide-3521835:3521835-plugin-discovery
into
2.x
1 month ago
Overview
0
Commits
2
Pipelines
3
Changes
9
Expand
Closes
#3521835
0
0
Merge request reports
Compare
2.x
version 2
3fdc83da
1 month ago
version 1
6a3b88a9
1 month ago
2.x (base)
and
latest version
latest version
3fdc83da
2 commits,
1 month ago
version 2
3fdc83da
2 commits,
1 month ago
version 1
6a3b88a9
1 commit,
1 month ago
9 files
+
93
−
42
Inline
Compare changes
Side-by-side
Inline
Show whitespace changes
Show one file at a time
Files
9
Search (e.g. *.vue) (Ctrl+P)
src/Attribute/Styleguide.php
0 → 100644
+
42
−
0
Options
<?php
declare
(
strict_types
=
1
);
namespace
Drupal\styleguide\Attribute
;
use
Drupal\Component\Plugin\Attribute\Plugin
;
use
Drupal\Core\StringTranslation\TranslatableMarkup
;
/**
* Defines a Styleguide attribute for plugin discovery.
*
* @see \Drupal\styleguide\StyleguideInterface
* @see \Drupal\styleguide\StyleguidePluginManager
* @see plugin_api
*/
#[\Attribute(\Attribute::TARGET_CLASS)]
class
Styleguide
extends
Plugin
{
/**
* Constructs a Styleguide attribute.
*
* @param string $id
* The plugin ID.
* @param \Drupal\Core\StringTranslation\TranslatableMarkup $label
* The label of the plugin.
* @param \Drupal\Core\StringTranslation\TranslatableMarkup|null $description
* (optional) A description of the plugin.
* @param string|null $deriver
* (optional) The deriver class.
* @param string|null $provider
* (optional) The machine name of the provider module.
*/
public
function
__construct
(
public
readonly
string
$id
,
public
readonly
TranslatableMarkup
$label
,
public
readonly
?TranslatableMarkup
$description
=
NULL
,
public
readonly
?string
$deriver
=
NULL
,
public
?string
$provider
=
NULL
,
)
{}
}
Loading