|
1
|
|
|
<?php |
|
2
|
|
|
|
|
3
|
|
|
/** |
|
4
|
|
|
* @license LGPLv3, http://opensource.org/licenses/LGPL-3.0 |
|
5
|
|
|
* @copyright Aimeos (aimeos.org), 2018-2025 |
|
6
|
|
|
* @package Client |
|
7
|
|
|
* @subpackage Html |
|
8
|
|
|
*/ |
|
9
|
|
|
|
|
10
|
|
|
|
|
11
|
|
|
namespace Aimeos\Client\Html\Catalog\Supplier; |
|
12
|
|
|
|
|
13
|
|
|
|
|
14
|
|
|
/** |
|
15
|
|
|
* Default implementation of catalog supplier HTML client |
|
16
|
|
|
* |
|
17
|
|
|
* @package Client |
|
18
|
|
|
* @subpackage Html |
|
19
|
|
|
*/ |
|
20
|
|
|
class Standard |
|
21
|
|
|
extends \Aimeos\Client\Html\Catalog\Filter\Standard |
|
22
|
|
|
implements \Aimeos\Client\Html\Common\Client\Factory\Iface |
|
23
|
|
|
{ |
|
24
|
|
|
/** client/html/catalog/supplier/name |
|
25
|
|
|
* Class name of the used catalog supplier client implementation |
|
26
|
|
|
* |
|
27
|
|
|
* Each default HTML client can be replace by an alternative imlementation. |
|
28
|
|
|
* To use this implementation, you have to set the last part of the class |
|
29
|
|
|
* name as configuration value so the client factory knows which class it |
|
30
|
|
|
* has to instantiate. |
|
31
|
|
|
* |
|
32
|
|
|
* For example, if the name of the default class is |
|
33
|
|
|
* |
|
34
|
|
|
* \Aimeos\Client\Html\Catalog\Supplier\Standard |
|
35
|
|
|
* |
|
36
|
|
|
* and you want to replace it with your own version named |
|
37
|
|
|
* |
|
38
|
|
|
* \Aimeos\Client\Html\Catalog\Supplier\Mysupplier |
|
39
|
|
|
* |
|
40
|
|
|
* then you have to set the this configuration option: |
|
41
|
|
|
* |
|
42
|
|
|
* client/html/catalog/supplier/name = Mysupplier |
|
43
|
|
|
* |
|
44
|
|
|
* The value is the last part of your own class name and it's case sensitive, |
|
45
|
|
|
* so take care that the configuration value is exactly named like the last |
|
46
|
|
|
* part of the class name. |
|
47
|
|
|
* |
|
48
|
|
|
* The allowed characters of the class name are A-Z, a-z and 0-9. No other |
|
49
|
|
|
* characters are possible! You should always start the last part of the class |
|
50
|
|
|
* name with an upper case character and continue only with lower case characters |
|
51
|
|
|
* or numbers. Avoid chamel case names like "MySupplier"! |
|
52
|
|
|
* |
|
53
|
|
|
* @param string Last part of the class name |
|
54
|
|
|
* @since 2018.04 |
|
55
|
|
|
*/ |
|
56
|
|
|
|
|
57
|
|
|
|
|
58
|
|
|
/** |
|
59
|
|
|
* Returns the names of the subpart clients |
|
60
|
|
|
* |
|
61
|
|
|
* @return array List of client names |
|
62
|
|
|
*/ |
|
63
|
|
|
protected function getSubClientNames() : array |
|
64
|
|
|
{ |
|
65
|
|
|
return ['supplier']; |
|
66
|
|
|
} |
|
67
|
|
|
|
|
68
|
|
|
|
|
69
|
|
|
/** client/html/catalog/supplier/decorators/excludes |
|
70
|
|
|
* Excludes decorators added by the "common" option from the catalog supplier html client |
|
71
|
|
|
* |
|
72
|
|
|
* Decorators extend the functionality of a class by adding new aspects |
|
73
|
|
|
* (e.g. log what is currently done), executing the methods of the underlying |
|
74
|
|
|
* class only in certain conditions (e.g. only for logged in users) or |
|
75
|
|
|
* modify what is returned to the caller. |
|
76
|
|
|
* |
|
77
|
|
|
* This option allows you to remove a decorator added via |
|
78
|
|
|
* "client/html/common/decorators/default" before they are wrapped |
|
79
|
|
|
* around the html client. |
|
80
|
|
|
* |
|
81
|
|
|
* client/html/catalog/supplier/decorators/excludes = array( 'decorator1' ) |
|
82
|
|
|
* |
|
83
|
|
|
* This would remove the decorator named "decorator1" from the list of |
|
84
|
|
|
* common decorators ("\Aimeos\Client\Html\Common\Decorator\*") added via |
|
85
|
|
|
* "client/html/common/decorators/default" to the html client. |
|
86
|
|
|
* |
|
87
|
|
|
* @param array List of decorator names |
|
88
|
|
|
* @see client/html/common/decorators/default |
|
89
|
|
|
* @see client/html/catalog/supplier/decorators/global |
|
90
|
|
|
* @see client/html/catalog/supplier/decorators/local |
|
91
|
|
|
*/ |
|
92
|
|
|
|
|
93
|
|
|
/** client/html/catalog/supplier/decorators/global |
|
94
|
|
|
* Adds a list of globally available decorators only to the catalog supplier html client |
|
95
|
|
|
* |
|
96
|
|
|
* Decorators extend the functionality of a class by adding new aspects |
|
97
|
|
|
* (e.g. log what is currently done), executing the methods of the underlying |
|
98
|
|
|
* class only in certain conditions (e.g. only for logged in users) or |
|
99
|
|
|
* modify what is returned to the caller. |
|
100
|
|
|
* |
|
101
|
|
|
* This option allows you to wrap global decorators |
|
102
|
|
|
* ("\Aimeos\Client\Html\Common\Decorator\*") around the html client. |
|
103
|
|
|
* |
|
104
|
|
|
* client/html/catalog/supplier/decorators/global = array( 'decorator1' ) |
|
105
|
|
|
* |
|
106
|
|
|
* This would add the decorator named "decorator1" defined by |
|
107
|
|
|
* "\Aimeos\Client\Html\Common\Decorator\Decorator1" only to the html client. |
|
108
|
|
|
* |
|
109
|
|
|
* @param array List of decorator names |
|
110
|
|
|
* @see client/html/common/decorators/default |
|
111
|
|
|
* @see client/html/catalog/supplier/decorators/excludes |
|
112
|
|
|
* @see client/html/catalog/supplier/decorators/local |
|
113
|
|
|
*/ |
|
114
|
|
|
|
|
115
|
|
|
/** client/html/catalog/supplier/decorators/local |
|
116
|
|
|
* Adds a list of local decorators only to the catalog supplier html client |
|
117
|
|
|
* |
|
118
|
|
|
* Decorators extend the functionality of a class by adding new aspects |
|
119
|
|
|
* (e.g. log what is currently done), executing the methods of the underlying |
|
120
|
|
|
* class only in certain conditions (e.g. only for logged in users) or |
|
121
|
|
|
* modify what is returned to the caller. |
|
122
|
|
|
* |
|
123
|
|
|
* This option allows you to wrap local decorators |
|
124
|
|
|
* ("\Aimeos\Client\Html\Catalog\Decorator\*") around the html client. |
|
125
|
|
|
* |
|
126
|
|
|
* client/html/catalog/supplier/decorators/local = array( 'decorator2' ) |
|
127
|
|
|
* |
|
128
|
|
|
* This would add the decorator named "decorator2" defined by |
|
129
|
|
|
* "\Aimeos\Client\Html\Catalog\Decorator\Decorator2" only to the html client. |
|
130
|
|
|
* |
|
131
|
|
|
* @param array List of decorator names |
|
132
|
|
|
* @see client/html/common/decorators/default |
|
133
|
|
|
* @see client/html/catalog/supplier/decorators/excludes |
|
134
|
|
|
* @see client/html/catalog/supplier/decorators/global |
|
135
|
|
|
*/ |
|
136
|
|
|
} |
|
137
|
|
|
|