-
-
Notifications
You must be signed in to change notification settings - Fork 7
Expand file tree
/
Copy pathPatternInterface.php
More file actions
165 lines (144 loc) · 3.67 KB
/
Copy pathPatternInterface.php
File metadata and controls
165 lines (144 loc) · 3.67 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
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
<?php
namespace Drupal\patternkit\Entity;
use Drupal\Core\Entity\ContentEntityInterface;
/**
* Defines the Pattern entity type which stores pattern metadata in Drupal.
*
* @package Drupal\patternkit\Entity
*/
interface PatternInterface extends ContentEntityInterface {
/**
* Get assets for the pattern instance.
*
* @return array
* A list of all assets for the pattern instance.
*/
public function getAssets(): array;
/**
* Get the computed hash for this pattern.
*
* @return string
* The computed hash for this pattern.
*/
public function getHash(): string;
/**
* Get the identifier for the library providing this pattern.
*
* @return string
* The identifier for the library providing this pattern.
*/
public function getLibrary(): string;
/**
* Get the plugin ID for the library parser plugin providing this pattern.
*
* @return string|null
* The plugin ID for the library parser plugin providing this pattern.
*/
public function getLibraryPluginId(): ?string;
/**
* Get the path to this pattern's discovered assets.
*
* @return string
* The path to this pattern's discovered assets.
*/
public function getPath(): string;
/**
* Get the schema for this pattern.
*
* @return string
* The schema for this pattern.
*/
public function getSchema(): string;
/**
* Get the template for this pattern.
*
* @return string
* The template for this pattern.
*/
public function getTemplate(): string;
/**
* Provides an asset ID in library/path namespace format.
*
* @return string
* ID string in the format:
* @code @library.name/path/to/pattern @endcode
*/
public function getAssetId(): string;
/**
* Get the version for this pattern instance.
*
* @return string
* The version for this pattern instance.
*/
public function getVersion(): string;
/**
* Get the category for this pattern instance.
*
* @return string
* The category for this pattern instance.
*/
public function getCategory(): string;
/**
* Get the description for this pattern instance.
*
* @return string
* The description for this pattern instance.
*/
public function getDescription(): string;
/**
* Get the name value for this pattern instance.
*
* @return string
* The name assigned to this pattern instance.
*/
public function getName(): string;
/**
* Set the library plugin ID for this pattern instance.
*
* @param string $id
* The library plugin ID.
*
* @return static
*/
public function setLibraryPluginId(string $id): self;
/**
* Set the schema for this pattern instance.
*
* @param string|array $schema
* The schema value for this pattern instance. If provided as an array, it
* will be JSON encoded automatically.
*
* @return static
*
* @throws \JsonException
* Throws an exception if serialization of the provided value fails.
*/
public function setSchema($schema): self;
/**
* Set the template value for this pattern instance.
*
* @param string $template
* The template value for this pattern instance.
*
* @return static
*/
public function setTemplate(string $template): self;
/**
* Set the assets for this pattern instance.
*
* @param array $assets
* Assets for this pattern instance.
*
* @return static
*/
public function setAssets(array $assets): self;
/**
* Set the version for this pattern instance.
*
* @param string $version
* The version value for this pattern instance.
*
* @return static
*/
public function setVersion(string $version): self;
}