1 <?php
2
3 /* --------------------------------------------------------------
4 CategoryInterface.inc.php 2016-01-18
5 Gambio GmbH
6 http://www.gambio.de
7 Copyright (c) 2016 Gambio GmbH
8 Released under the GNU General Public License (Version 2)
9 [http://www.gnu.org/licenses/gpl-2.0.html]
10 --------------------------------------------------------------
11 */
12
13
14 /**
15 * Interface CategoryInterface
16 *
17 * @category System
18 * @package Category
19 * @subpackage Interfaces
20 */
21 interface CategoryInterface
22 {
23 /**
24 * Is tax of the OrderItem allowed?
25 *
26 * @return bool Value if tax of the OrderItem allowed.
27 */
28 public function isActive();
29
30
31 /**
32 * Sets whether category is active or not.
33 *
34 * @param BoolType $status Category active or not?
35 *
36 * @return CategoryInterface Same instance for chained method calls.
37 */
38 public function setActive(BoolType $status);
39
40
41 /**
42 * Returns the ID of the parent category.
43 *
44 * @return int The ID of the parent category
45 */
46 public function getParentId();
47
48
49 /**
50 * Sets the parent ID of the category.
51 *
52 * @param IdType $categoryId Category ID.
53 *
54 * @return CategoryInterface Same instance for chained method calls.
55 */
56 public function setParentId(IdType $categoryId);
57
58
59 /**
60 * Returns the sort order value.
61 *
62 * @return int Sort order value.
63 */
64 public function getSortOrder();
65
66
67 /**
68 * Sets the sort order to the given value.
69 *
70 * @param IntType $sortOrder Sorting order.
71 *
72 * @return CategoryInterface Same instance for chained method calls.
73 */
74 public function setSortOrder(IntType $sortOrder);
75
76
77 /**
78 * Returns the date time when the category was added.
79 *
80 * @return DateTime The date time when the category was added.
81 */
82 public function getAddedDateTime();
83
84
85 /**
86 * Sets the date time when the category was added.
87 *
88 * @param DateTime $added DateTime when the category has been added.
89 *
90 * @return CategoryInterface Same instance for chained method calls.
91 */
92 public function setAddedDateTime(DateTime $added);
93
94
95 /**
96 * Returns the date time when the category was modified last.
97 *
98 * @return DateTime The date time when the category was modified last.
99 */
100 public function getLastModifiedDateTime();
101
102
103 /**
104 * Sets the date time when the category was modified last.
105 *
106 * @param DateTime $modified DateTime when the category has been lastly modified.
107 *
108 * @return CategoryInterface Same instance for chained method calls.
109 */
110 public function setLastModifiedDateTime(DateTime $modified);
111
112
113 /**
114 * Returns the settings of the category.
115 *
116 * @return CategorySettingsInterface Settings of the category.
117 */
118 public function getSettings();
119
120
121 /**
122 * Sets the settings of the category.
123 *
124 * @param CategorySettingsInterface $categorySettings The settings of the category.
125 *
126 * @return CategoryInterface Same instance for chained method calls.
127 */
128 public function setSettings(CategorySettingsInterface $categorySettings);
129
130
131 /**
132 * Returns the name of the category in the language with the provided language code.
133 *
134 * @param LanguageCode $language Two letter Language code.
135 *
136 * @return string Name of the category from the given language code.
137 */
138 public function getName(LanguageCode $language);
139
140
141 /**
142 * Sets the name of the category for the language with the provided language code.
143 *
144 * @param StringType $text Name of the category.
145 * @param LanguageCode $language Two letter language code.
146 *
147 * @return CategoryInterface Same instance for chained method calls.
148 */
149 public function setName(StringType $text, LanguageCode $language);
150
151
152 /**
153 * Returns the heading title of the category in the language with the provided language code.
154 *
155 * @param LanguageCode $language Two letter language code.
156 *
157 * @return string Heading title of the category from the given language code.
158 */
159 public function getHeadingTitle(LanguageCode $language);
160
161
162 /**
163 * Sets the heading title of the category for the language with the provided language code.
164 *
165 * @param StringType $text Heading title of the category.
166 * @param LanguageCode $language Two letter language code.
167 *
168 * @return CategoryInterface Same instance for chained method calls.
169 */
170 public function setHeadingTitle(StringType $text, LanguageCode $language);
171
172
173 /**
174 * Returns the description of the category for the language with the provided language code.
175 *
176 * @param LanguageCode $language Two letter language code.
177 *
178 * @return string Description of the category from the given language code.
179 */
180 public function getDescription(LanguageCode $language);
181
182
183 /**
184 * Sets the description of the category for the language with the provided language code.
185 *
186 * @param StringType $text Description of the category.
187 * @param LanguageCode $language Two letter language code.
188 *
189 * @return CategoryInterface Same instance for chained method calls.
190 */
191 public function setDescription(StringType $text, LanguageCode $language);
192
193
194 /**
195 * Returns the meta title of the category for the language with the provided language code.
196 *
197 * @param LanguageCode $language Two letter language code.
198 *
199 * @return string Meta title of the category from the given language code
200 */
201 public function getMetaTitle(LanguageCode $language);
202
203
204 /**
205 * Sets the meta title of the category for the language with the provided language code.
206 *
207 * @param StringType $text Meta title of the category.
208 * @param LanguageCode $language Two letter language code.
209 *
210 * @return CategoryInterface Same instance for chained method calls.
211 */
212 public function setMetaTitle(StringType $text, LanguageCode $language);
213
214
215 /**
216 * Returns the meta description of the category in the language with the provided language code.
217 *
218 * @param LanguageCode $language Two letter language code.
219 *
220 * @return string Meta description of the category from the given language code.
221 */
222 public function getMetaDescription(LanguageCode $language);
223
224
225 /**
226 * Sets the meta description of the category for the language with the provided language code.
227 *
228 * @param StringType $text Meta description of the category.
229 * @param LanguageCode $language Two letter language code.
230 *
231 * @return CategoryInterface Same instance for chained method calls.
232 */
233 public function setMetaDescription(StringType $text, LanguageCode $language);
234
235
236 /**
237 * Returns the meta keywords of the category in the language with the provided language code.
238 *
239 * @param LanguageCode $language Two letter language code.
240 *
241 * @return string Meta keywords of the category from the given language code.
242 */
243 public function getMetaKeywords(LanguageCode $language);
244
245
246 /**
247 * Sets the meta keywords of the category for the language with the provided language code.
248 *
249 * @param StringType $text The meta keyword for the category.
250 * @param LanguageCode $language Two letter language code.
251 *
252 * @return CategoryInterface Same instance for chained method calls.
253 */
254 public function setMetaKeywords(StringType $text, LanguageCode $language);
255
256
257 /**
258 * Returns the url keywords of the category in the language with the provided language code.
259 *
260 * @param LanguageCode $language Two letter language code.
261 *
262 * @return string URL keywords of the category from the given language code.
263 */
264 public function getUrlKeywords(LanguageCode $language);
265
266
267 /**
268 * Sets the url keywords of the category for the language with the provided language code.
269 *
270 * @param StringType $text URL Keyword for the category.
271 * @param LanguageCode $language Two letter language code.
272 *
273 * @return CategoryInterface Same instance for chained method calls.
274 */
275 public function setUrlKeywords(StringType $text, LanguageCode $language);
276
277
278 /**
279 * Returns the image filename of the category.
280 *
281 * @return string The image filename of the category.
282 */
283 public function getImage();
284
285
286 /**
287 * Sets the image filename of the category.
288 *
289 * @param StringType $imageFile Image filename.
290 *
291 * @return CategoryInterface Same instance for chained method calls.
292 */
293 public function setImage(StringType $imageFile);
294
295
296 /**
297 * Returns the alternative text of the image in the language with the provided language code.
298 *
299 * @param LanguageCode $language Two letter language code.
300 *
301 * @return string The alt text of the image.
302 */
303 public function getImageAltText(LanguageCode $language);
304
305
306 /**
307 * Set the alternative text of the image for the language with the provided language code.
308 *
309 * @param StringType $text Alternative text for the image.
310 * @param LanguageCode $language Two letter language code.
311 *
312 * @return CategoryInterface Same instance for chained method calls.
313 */
314 public function setImageAltText(StringType $text, LanguageCode $language);
315
316
317 /**
318 * Returns the icon filename of the category.
319 *
320 * @return string The icon filename of the category.
321 */
322 public function getIcon();
323
324
325 /**
326 * Sets the icon filename of the category.
327 *
328 * @param StringType $iconFile Icon filename.
329 *
330 * @return CategoryInterface Same instance for chained method calls.
331 */
332 public function setIcon(StringType $iconFile);
333
334
335 /**
336 * Returns an addon value by a given key.
337 *
338 * @param StringType $key Identifier key.
339 *
340 * @return string Addon value by a given key.
341 */
342 public function getAddonValue(StringType $key);
343
344
345 /**
346 * Sets an addon key and value.
347 *
348 * @param StringType $key Identifier key.
349 * @param StringType $value The value to be saved.
350 *
351 * @return CategoryInterface Same instance for chained method calls.
352 */
353 public function setAddonValue(StringType $key, StringType $value);
354
355
356 /**
357 * Returns a KeyValueCollection of addon values.
358 *
359 * @return KeyValueCollection A KeyValueCollection of addon values.
360 */
361 public function getAddonValues();
362
363
364 /**
365 * Adds a KeyValueCollection of addon values.
366 *
367 * @param KeyValueCollection $collection Key value collection.
368 *
369 * @return CategoryInterface Same instance for chained method calls.
370 */
371 public function addAddonValues(KeyValueCollection $collection);
372
373
374 /**
375 * Deletes an addon value with a given key from the KeyValueCollection.
376 *
377 * @param StringType $key Identifier key.
378 *
379 * @return CategoryInterface Same instance for chained method calls.
380 */
381 public function deleteAddonValue(StringType $key);
382 }