-
-
Notifications
You must be signed in to change notification settings - Fork 7
Expand file tree
/
Copy pathPatternLibrary.php
More file actions
84 lines (74 loc) · 1.9 KB
/
Copy pathPatternLibrary.php
File metadata and controls
84 lines (74 loc) · 1.9 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
<?php
namespace Drupal\patternkit\Annotation;
use Drupal\Component\Annotation\Plugin;
use Drupal\patternkit\PatternLibraryPluginDefault;
use Drupal\patternkit\PatternLibraryPluginDefinition;
/**
* Defines a Pattern Library annotation object.
*
* Pattern Libraries such as 'twig', 'REST', 'react' etc. define methods for
* parsing, loading, editing, and rendering their patterns.
*
* Plugin namespace: Plugin\PatternLibrary
*
* @see \Drupal\patternkit\PatternLibraryInterface
* @see \Drupal\patternkit\PatternLibraryPluginDefault
* @see \Drupal\patternkit\PatternLibraryPluginManager
* @see plugin_api
*
* @Annotation
*/
class PatternLibrary extends Plugin {
/**
* The plugin ID.
*
* @var string
*/
public string $id;
/**
* The human-readable name.
*
* @var string
*
* @ingroup plugin_translatable
*/
public string $label;
/**
* An optional description for advanced layouts.
*
* Sometimes layouts are so complex that the name is insufficient to describe
* a layout such that a visually impaired administrator could layout a page
* for a non-visually impaired audience. If specified, it will provide a
* description that is used for accessibility purposes.
*
* @var string
*
* @ingroup plugin_translatable
*/
public string $description;
/**
* The human-readable category.
*
* @var string
*
* @see \Drupal\Component\Plugin\CategorizingPluginManagerInterface
*
* @ingroup plugin_translatable
*/
public string $category;
/**
* The layout plugin class.
*
* This default value is used for plugins defined in layouts.yml that do not
* specify a class themselves.
*
* @var string
*/
public string $class = PatternLibraryPluginDefault::class;
/**
* {@inheritdoc}
*/
public function get(): PatternLibraryPluginDefinition {
return new PatternLibraryPluginDefinition($this->definition);
}
}