1 | <?php |
||
20 | class Supplier |
||
21 | extends \Aimeos\MShop\Service\Provider\Decorator\Base |
||
|
|||
22 | implements \Aimeos\MShop\Service\Provider\Decorator\Iface |
||
23 | { |
||
24 | private $feConfig = array( |
||
25 | 'supplier.code' => array( |
||
26 | 'code' => 'supplier.code', |
||
27 | 'internalcode'=> 'supplier.code', |
||
28 | 'label'=> 'Pick-up address', |
||
29 | 'type'=> 'list', |
||
30 | 'internaltype'=> 'array', |
||
31 | 'default'=> [], |
||
32 | 'required'=> true |
||
33 | ), |
||
34 | ); |
||
35 | |||
36 | |||
37 | /** |
||
38 | * Initializes a new service provider object using the given context object. |
||
39 | * |
||
40 | * @param \Aimeos\MShop\Service\Provider\Iface $provider Service provider or decorator |
||
41 | * @param \Aimeos\MShop\Context\Item\Iface $context Context object with required objects |
||
42 | * @param \Aimeos\MShop\Service\Item\Iface $serviceItem Service item with configuration for the provider |
||
43 | */ |
||
44 | public function __construct( \Aimeos\MShop\Service\Provider\Iface $provider, |
||
96 | |||
97 | |||
98 | /** |
||
99 | * Checks the frontend configuration attributes for validity. |
||
100 | * |
||
101 | * @param array $attributes Attributes entered by the customer during the checkout process |
||
102 | * @return array An array with the attribute keys as key and an error message as values for all attributes that are |
||
103 | * known by the provider but aren't valid resp. null for attributes whose values are OK |
||
104 | */ |
||
105 | public function checkConfigFE( array $attributes ) |
||
111 | |||
112 | |||
113 | /** |
||
114 | * Returns the configuration attribute definitions of the provider to generate a list of available fields and |
||
115 | * rules for the value of each field in the frontend. |
||
116 | * |
||
117 | * @param \Aimeos\MShop\Order\Item\Base\Iface $basket Basket object |
||
118 | * @return array List of attribute definitions implementing \Aimeos\MW\Common\Critera\Attribute\Iface |
||
119 | */ |
||
120 | public function getConfigFE( \Aimeos\MShop\Order\Item\Base\Iface $basket ) |
||
146 | } |
||
147 |