1 <?php
2
3 /* --------------------------------------------------------------
4 OrderItemAddonValueStorage.inc.php 2015-12-17
5 Gambio GmbH
6 http://www.gambio.de
7 Copyright (c) 2015 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 MainFactory::load_class('AbstractAddonValueStorage');
14
15 /**
16 * Class OrderItemAddonValueStorage
17 *
18 * @category System
19 * @package Order
20 * @subpackage Storages
21 */
22 class OrderItemAddonValueStorage extends AbstractAddonValueStorage
23 {
24 /**
25 * Get the container class type.
26 *
27 * @return string
28 */
29 protected function _getContainerType()
30 {
31 return 'OrderItemInterface';
32 }
33
34
35 /**
36 * Returns a multidimensional array with the primary key of the orders_products table and the required column names
37 * with the corresponding key used in the KeyValueCollection.
38 *
39 * @return array
40 */
41 protected function _getExternalFieldsArray()
42 {
43 $externalFields = array();
44 $externalFields['orders_products']['primary_key'] = 'orders_products_id';
45 $externalFields['orders_products']['fields'] = array(
46 'products_id' => 'productId'
47 );
48
49 return $externalFields;
50 }
51 }