Completed
Push — master ( a97add...702095 )
by Aimeos
02:48
created
lib/custom/src/MShop/Customer/Manager/Lists/Ezpublish.php 2 patches
Indentation   +172 added lines, -172 removed lines patch added patch discarded remove patch
@@ -18,177 +18,177 @@
 block discarded – undo
18 18
  * @subpackage Customer
19 19
  */
20 20
 class Ezpublish
21
-	extends \Aimeos\MShop\Customer\Manager\Lists\Standard
22
-	implements \Aimeos\MShop\Customer\Manager\Lists\Iface, \Aimeos\MShop\Common\Manager\Lists\Iface
21
+    extends \Aimeos\MShop\Customer\Manager\Lists\Standard
22
+    implements \Aimeos\MShop\Customer\Manager\Lists\Iface, \Aimeos\MShop\Common\Manager\Lists\Iface
23 23
 {
24
-	private $searchConfig = array(
25
-		'customer.lists.id'=> array(
26
-			'code'=>'customer.lists.id',
27
-			'internalcode'=>'ezuli."id"',
28
-			'internaldeps' => array( 'LEFT JOIN "ezuser_list" AS ezuli ON ( ezu."id" = ezuli."parentid" )' ),
29
-			'label'=>'Customer list ID',
30
-			'type'=> 'integer',
31
-			'internaltype'=> \Aimeos\MW\DB\Statement\Base::PARAM_INT,
32
-			'public' => false,
33
-		),
34
-		'customer.lists.siteid'=> array(
35
-			'code'=>'customer.lists.siteid',
36
-			'internalcode'=>'ezuli."siteid"',
37
-			'label'=>'Customer list site ID',
38
-			'type'=> 'integer',
39
-			'internaltype'=> \Aimeos\MW\DB\Statement\Base::PARAM_INT,
40
-			'public' => false,
41
-		),
42
-		'customer.lists.parentid'=> array(
43
-			'code'=>'customer.lists.parentid',
44
-			'internalcode'=>'ezuli."parentid"',
45
-			'label'=>'Customer list parent ID',
46
-			'type'=> 'integer',
47
-			'internaltype'=> \Aimeos\MW\DB\Statement\Base::PARAM_INT,
48
-			'public' => false,
49
-		),
50
-		'customer.lists.domain'=> array(
51
-			'code'=>'customer.lists.domain',
52
-			'internalcode'=>'ezuli."domain"',
53
-			'label'=>'Customer list domain',
54
-			'type'=> 'string',
55
-			'internaltype'=> \Aimeos\MW\DB\Statement\Base::PARAM_STR,
56
-		),
57
-		'customer.lists.typeid' => array(
58
-			'code'=>'customer.lists.typeid',
59
-			'internalcode'=>'ezuli."typeid"',
60
-			'label'=>'Customer list type ID',
61
-			'type'=> 'integer',
62
-			'internaltype' => \Aimeos\MW\DB\Statement\Base::PARAM_INT,
63
-			'public' => false,
64
-		),
65
-		'customer.lists.refid'=> array(
66
-			'code'=>'customer.lists.refid',
67
-			'internalcode'=>'ezuli."refid"',
68
-			'label'=>'Customer list reference ID',
69
-			'type'=> 'string',
70
-			'internaltype'=> \Aimeos\MW\DB\Statement\Base::PARAM_STR,
71
-		),
72
-		'customer.lists.datestart' => array(
73
-			'code'=>'customer.lists.datestart',
74
-			'internalcode'=>'ezuli."start"',
75
-			'label'=>'Customer list start date/time',
76
-			'type'=> 'datetime',
77
-			'internaltype' => \Aimeos\MW\DB\Statement\Base::PARAM_STR,
78
-		),
79
-		'customer.lists.dateend' => array(
80
-			'code'=>'customer.lists.dateend',
81
-			'internalcode'=>'ezuli."end"',
82
-			'label'=>'Customer list end date/time',
83
-			'type'=> 'datetime',
84
-			'internaltype' => \Aimeos\MW\DB\Statement\Base::PARAM_STR,
85
-		),
86
-		'customer.lists.config' => array(
87
-			'code'=>'customer.lists.config',
88
-			'internalcode'=>'ezuli."config"',
89
-			'label'=>'Customer list position',
90
-			'type'=> 'string',
91
-			'internaltype' => \Aimeos\MW\DB\Statement\Base::PARAM_STR,
92
-		),
93
-		'customer.lists.position' => array(
94
-			'code'=>'customer.lists.position',
95
-			'internalcode'=>'ezuli."pos"',
96
-			'label'=>'Customer list position',
97
-			'type'=> 'integer',
98
-			'internaltype' => \Aimeos\MW\DB\Statement\Base::PARAM_INT,
99
-		),
100
-		'customer.lists.status' => array(
101
-			'code'=>'customer.lists.status',
102
-			'internalcode'=>'ezuli."status"',
103
-			'label'=>'Customer list status',
104
-			'type'=> 'integer',
105
-			'internaltype' => \Aimeos\MW\DB\Statement\Base::PARAM_INT,
106
-		),
107
-		'customer.lists.ctime'=> array(
108
-			'code'=>'customer.lists.ctime',
109
-			'internalcode'=>'ezuli."ctime"',
110
-			'label'=>'Customer list create date/time',
111
-			'type'=> 'datetime',
112
-			'internaltype'=> \Aimeos\MW\DB\Statement\Base::PARAM_STR,
113
-		),
114
-		'customer.lists.mtime'=> array(
115
-			'code'=>'customer.lists.mtime',
116
-			'internalcode'=>'ezuli."mtime"',
117
-			'label'=>'Customer list modification date/time',
118
-			'type'=> 'datetime',
119
-			'internaltype'=> \Aimeos\MW\DB\Statement\Base::PARAM_STR,
120
-		),
121
-		'customer.lists.editor'=> array(
122
-			'code'=>'customer.lists.editor',
123
-			'internalcode'=>'ezuli."editor"',
124
-			'label'=>'Customer list editor',
125
-			'type'=> 'string',
126
-			'internaltype'=> \Aimeos\MW\DB\Statement\Base::PARAM_STR,
127
-		),
128
-	);
129
-
130
-
131
-	/**
132
-	 * Removes old entries from the storage.
133
-	 *
134
-	 * @param array $siteids List of IDs for sites whose entries should be deleted
135
-	 */
136
-	public function cleanup( array $siteids )
137
-	{
138
-		$path = 'mshop/customer/manager/lists/submanagers';
139
-		foreach( $this->getContext()->getConfig()->get( $path, array( 'type' ) ) as $domain ) {
140
-			$this->getSubManager( $domain )->cleanup( $siteids );
141
-		}
142
-
143
-		$this->cleanupBase( $siteids, 'mshop/customer/manager/lists/ezpublish/delete' );
144
-	}
145
-
146
-
147
-	/**
148
-	 * Returns the list attributes that can be used for searching.
149
-	 *
150
-	 * @param boolean $withsub Return also attributes of sub-managers if true
151
-	 * @return array List of attribute items implementing \Aimeos\MW\Criteria\Attribute\Iface
152
-	 */
153
-	public function getSearchAttributes( $withsub = true )
154
-	{
155
-		$path = 'mshop/customer/manager/lists/submanagers';
156
-
157
-		return $this->getSearchAttributesBase( $this->searchConfig, $path, array( 'type' ), $withsub );
158
-	}
159
-
160
-
161
-	/**
162
-	 * Returns a new manager for customer extensions
163
-	 *
164
-	 * @param string $manager Name of the sub manager type in lower case
165
-	 * @param string|null $name Name of the implementation, will be from configuration (or Default) if null
166
-	 * @return mixed Manager for different extensions, e.g stock, tags, locations, etc.
167
-	 */
168
-	public function getSubManager( $manager, $name = null )
169
-	{
170
-		return $this->getSubManagerBase( 'customer', 'lists/' . $manager, ( $name === null ? 'Ezpublish' : $name ) );
171
-	}
172
-
173
-
174
-	/**
175
-	 * Returns the config path for retrieving the configuration values.
176
-	 *
177
-	 * @return string Configuration path (mshop/customer/manager/lists/ezpublish/)
178
-	 */
179
-	protected function getConfigPath()
180
-	{
181
-		return 'mshop/customer/manager/lists/ezpublish/';
182
-	}
183
-
184
-
185
-	/**
186
-	 * Returns the search configuration for searching items.
187
-	 *
188
-	 * @return array Associative list of search keys and search definitions
189
-	 */
190
-	protected function getSearchConfig()
191
-	{
192
-		return $this->searchConfig;
193
-	}
24
+    private $searchConfig = array(
25
+        'customer.lists.id'=> array(
26
+            'code'=>'customer.lists.id',
27
+            'internalcode'=>'ezuli."id"',
28
+            'internaldeps' => array( 'LEFT JOIN "ezuser_list" AS ezuli ON ( ezu."id" = ezuli."parentid" )' ),
29
+            'label'=>'Customer list ID',
30
+            'type'=> 'integer',
31
+            'internaltype'=> \Aimeos\MW\DB\Statement\Base::PARAM_INT,
32
+            'public' => false,
33
+        ),
34
+        'customer.lists.siteid'=> array(
35
+            'code'=>'customer.lists.siteid',
36
+            'internalcode'=>'ezuli."siteid"',
37
+            'label'=>'Customer list site ID',
38
+            'type'=> 'integer',
39
+            'internaltype'=> \Aimeos\MW\DB\Statement\Base::PARAM_INT,
40
+            'public' => false,
41
+        ),
42
+        'customer.lists.parentid'=> array(
43
+            'code'=>'customer.lists.parentid',
44
+            'internalcode'=>'ezuli."parentid"',
45
+            'label'=>'Customer list parent ID',
46
+            'type'=> 'integer',
47
+            'internaltype'=> \Aimeos\MW\DB\Statement\Base::PARAM_INT,
48
+            'public' => false,
49
+        ),
50
+        'customer.lists.domain'=> array(
51
+            'code'=>'customer.lists.domain',
52
+            'internalcode'=>'ezuli."domain"',
53
+            'label'=>'Customer list domain',
54
+            'type'=> 'string',
55
+            'internaltype'=> \Aimeos\MW\DB\Statement\Base::PARAM_STR,
56
+        ),
57
+        'customer.lists.typeid' => array(
58
+            'code'=>'customer.lists.typeid',
59
+            'internalcode'=>'ezuli."typeid"',
60
+            'label'=>'Customer list type ID',
61
+            'type'=> 'integer',
62
+            'internaltype' => \Aimeos\MW\DB\Statement\Base::PARAM_INT,
63
+            'public' => false,
64
+        ),
65
+        'customer.lists.refid'=> array(
66
+            'code'=>'customer.lists.refid',
67
+            'internalcode'=>'ezuli."refid"',
68
+            'label'=>'Customer list reference ID',
69
+            'type'=> 'string',
70
+            'internaltype'=> \Aimeos\MW\DB\Statement\Base::PARAM_STR,
71
+        ),
72
+        'customer.lists.datestart' => array(
73
+            'code'=>'customer.lists.datestart',
74
+            'internalcode'=>'ezuli."start"',
75
+            'label'=>'Customer list start date/time',
76
+            'type'=> 'datetime',
77
+            'internaltype' => \Aimeos\MW\DB\Statement\Base::PARAM_STR,
78
+        ),
79
+        'customer.lists.dateend' => array(
80
+            'code'=>'customer.lists.dateend',
81
+            'internalcode'=>'ezuli."end"',
82
+            'label'=>'Customer list end date/time',
83
+            'type'=> 'datetime',
84
+            'internaltype' => \Aimeos\MW\DB\Statement\Base::PARAM_STR,
85
+        ),
86
+        'customer.lists.config' => array(
87
+            'code'=>'customer.lists.config',
88
+            'internalcode'=>'ezuli."config"',
89
+            'label'=>'Customer list position',
90
+            'type'=> 'string',
91
+            'internaltype' => \Aimeos\MW\DB\Statement\Base::PARAM_STR,
92
+        ),
93
+        'customer.lists.position' => array(
94
+            'code'=>'customer.lists.position',
95
+            'internalcode'=>'ezuli."pos"',
96
+            'label'=>'Customer list position',
97
+            'type'=> 'integer',
98
+            'internaltype' => \Aimeos\MW\DB\Statement\Base::PARAM_INT,
99
+        ),
100
+        'customer.lists.status' => array(
101
+            'code'=>'customer.lists.status',
102
+            'internalcode'=>'ezuli."status"',
103
+            'label'=>'Customer list status',
104
+            'type'=> 'integer',
105
+            'internaltype' => \Aimeos\MW\DB\Statement\Base::PARAM_INT,
106
+        ),
107
+        'customer.lists.ctime'=> array(
108
+            'code'=>'customer.lists.ctime',
109
+            'internalcode'=>'ezuli."ctime"',
110
+            'label'=>'Customer list create date/time',
111
+            'type'=> 'datetime',
112
+            'internaltype'=> \Aimeos\MW\DB\Statement\Base::PARAM_STR,
113
+        ),
114
+        'customer.lists.mtime'=> array(
115
+            'code'=>'customer.lists.mtime',
116
+            'internalcode'=>'ezuli."mtime"',
117
+            'label'=>'Customer list modification date/time',
118
+            'type'=> 'datetime',
119
+            'internaltype'=> \Aimeos\MW\DB\Statement\Base::PARAM_STR,
120
+        ),
121
+        'customer.lists.editor'=> array(
122
+            'code'=>'customer.lists.editor',
123
+            'internalcode'=>'ezuli."editor"',
124
+            'label'=>'Customer list editor',
125
+            'type'=> 'string',
126
+            'internaltype'=> \Aimeos\MW\DB\Statement\Base::PARAM_STR,
127
+        ),
128
+    );
129
+
130
+
131
+    /**
132
+     * Removes old entries from the storage.
133
+     *
134
+     * @param array $siteids List of IDs for sites whose entries should be deleted
135
+     */
136
+    public function cleanup( array $siteids )
137
+    {
138
+        $path = 'mshop/customer/manager/lists/submanagers';
139
+        foreach( $this->getContext()->getConfig()->get( $path, array( 'type' ) ) as $domain ) {
140
+            $this->getSubManager( $domain )->cleanup( $siteids );
141
+        }
142
+
143
+        $this->cleanupBase( $siteids, 'mshop/customer/manager/lists/ezpublish/delete' );
144
+    }
145
+
146
+
147
+    /**
148
+     * Returns the list attributes that can be used for searching.
149
+     *
150
+     * @param boolean $withsub Return also attributes of sub-managers if true
151
+     * @return array List of attribute items implementing \Aimeos\MW\Criteria\Attribute\Iface
152
+     */
153
+    public function getSearchAttributes( $withsub = true )
154
+    {
155
+        $path = 'mshop/customer/manager/lists/submanagers';
156
+
157
+        return $this->getSearchAttributesBase( $this->searchConfig, $path, array( 'type' ), $withsub );
158
+    }
159
+
160
+
161
+    /**
162
+     * Returns a new manager for customer extensions
163
+     *
164
+     * @param string $manager Name of the sub manager type in lower case
165
+     * @param string|null $name Name of the implementation, will be from configuration (or Default) if null
166
+     * @return mixed Manager for different extensions, e.g stock, tags, locations, etc.
167
+     */
168
+    public function getSubManager( $manager, $name = null )
169
+    {
170
+        return $this->getSubManagerBase( 'customer', 'lists/' . $manager, ( $name === null ? 'Ezpublish' : $name ) );
171
+    }
172
+
173
+
174
+    /**
175
+     * Returns the config path for retrieving the configuration values.
176
+     *
177
+     * @return string Configuration path (mshop/customer/manager/lists/ezpublish/)
178
+     */
179
+    protected function getConfigPath()
180
+    {
181
+        return 'mshop/customer/manager/lists/ezpublish/';
182
+    }
183
+
184
+
185
+    /**
186
+     * Returns the search configuration for searching items.
187
+     *
188
+     * @return array Associative list of search keys and search definitions
189
+     */
190
+    protected function getSearchConfig()
191
+    {
192
+        return $this->searchConfig;
193
+    }
194 194
 }
Please login to merge, or discard this patch.
Spacing   +9 added lines, -9 removed lines patch added patch discarded remove patch
@@ -25,7 +25,7 @@  discard block
 block discarded – undo
25 25
 		'customer.lists.id'=> array(
26 26
 			'code'=>'customer.lists.id',
27 27
 			'internalcode'=>'ezuli."id"',
28
-			'internaldeps' => array( 'LEFT JOIN "ezuser_list" AS ezuli ON ( ezu."id" = ezuli."parentid" )' ),
28
+			'internaldeps' => array('LEFT JOIN "ezuser_list" AS ezuli ON ( ezu."id" = ezuli."parentid" )'),
29 29
 			'label'=>'Customer list ID',
30 30
 			'type'=> 'integer',
31 31
 			'internaltype'=> \Aimeos\MW\DB\Statement\Base::PARAM_INT,
@@ -133,14 +133,14 @@  discard block
 block discarded – undo
133 133
 	 *
134 134
 	 * @param array $siteids List of IDs for sites whose entries should be deleted
135 135
 	 */
136
-	public function cleanup( array $siteids )
136
+	public function cleanup(array $siteids)
137 137
 	{
138 138
 		$path = 'mshop/customer/manager/lists/submanagers';
139
-		foreach( $this->getContext()->getConfig()->get( $path, array( 'type' ) ) as $domain ) {
140
-			$this->getSubManager( $domain )->cleanup( $siteids );
139
+		foreach ($this->getContext()->getConfig()->get($path, array('type')) as $domain) {
140
+			$this->getSubManager($domain)->cleanup($siteids);
141 141
 		}
142 142
 
143
-		$this->cleanupBase( $siteids, 'mshop/customer/manager/lists/ezpublish/delete' );
143
+		$this->cleanupBase($siteids, 'mshop/customer/manager/lists/ezpublish/delete');
144 144
 	}
145 145
 
146 146
 
@@ -150,11 +150,11 @@  discard block
 block discarded – undo
150 150
 	 * @param boolean $withsub Return also attributes of sub-managers if true
151 151
 	 * @return array List of attribute items implementing \Aimeos\MW\Criteria\Attribute\Iface
152 152
 	 */
153
-	public function getSearchAttributes( $withsub = true )
153
+	public function getSearchAttributes($withsub = true)
154 154
 	{
155 155
 		$path = 'mshop/customer/manager/lists/submanagers';
156 156
 
157
-		return $this->getSearchAttributesBase( $this->searchConfig, $path, array( 'type' ), $withsub );
157
+		return $this->getSearchAttributesBase($this->searchConfig, $path, array('type'), $withsub);
158 158
 	}
159 159
 
160 160
 
@@ -165,9 +165,9 @@  discard block
 block discarded – undo
165 165
 	 * @param string|null $name Name of the implementation, will be from configuration (or Default) if null
166 166
 	 * @return mixed Manager for different extensions, e.g stock, tags, locations, etc.
167 167
 	 */
168
-	public function getSubManager( $manager, $name = null )
168
+	public function getSubManager($manager, $name = null)
169 169
 	{
170
-		return $this->getSubManagerBase( 'customer', 'lists/' . $manager, ( $name === null ? 'Ezpublish' : $name ) );
170
+		return $this->getSubManagerBase('customer', 'lists/'.$manager, ($name === null ? 'Ezpublish' : $name));
171 171
 	}
172 172
 
173 173
 
Please login to merge, or discard this patch.
lib/custom/src/MShop/Customer/Manager/Lists/Type/Ezpublish.php 2 patches
Indentation   +135 added lines, -135 removed lines patch added patch discarded remove patch
@@ -18,140 +18,140 @@
 block discarded – undo
18 18
  * @subpackage Customer
19 19
  */
20 20
 class Ezpublish
21
-	extends \Aimeos\MShop\Customer\Manager\Lists\Type\Standard
22
-	implements \Aimeos\MShop\Customer\Manager\Lists\Type\Iface
21
+    extends \Aimeos\MShop\Customer\Manager\Lists\Type\Standard
22
+    implements \Aimeos\MShop\Customer\Manager\Lists\Type\Iface
23 23
 {
24
-	private $searchConfig = array(
25
-		'customer.lists.type.id' => array(
26
-			'code'=>'customer.lists.type.id',
27
-			'internalcode'=>'ezulity."id"',
28
-			'internaldeps'=>array( 'LEFT JOIN "ezuser_list_type" AS ezulity ON ( ezuli."typeid" = ezulity."id" )' ),
29
-			'label'=>'Customer list type ID',
30
-			'type'=> 'integer',
31
-			'internaltype' => \Aimeos\MW\DB\Statement\Base::PARAM_INT,
32
-			'public' => false,
33
-		),
34
-		'customer.lists.type.siteid' => array(
35
-			'code'=>'customer.lists.type.siteid',
36
-			'internalcode'=>'ezulity."siteid"',
37
-			'label'=>'Customer list type site ID',
38
-			'type'=> 'integer',
39
-			'internaltype' => \Aimeos\MW\DB\Statement\Base::PARAM_INT,
40
-			'public' => false,
41
-		),
42
-		'customer.lists.type.code' => array(
43
-			'code'=>'customer.lists.type.code',
44
-			'internalcode'=>'ezulity."code"',
45
-			'label'=>'Customer list type code',
46
-			'type'=> 'string',
47
-			'internaltype' => \Aimeos\MW\DB\Statement\Base::PARAM_STR,
48
-		),
49
-		'customer.lists.type.domain' => array(
50
-			'code'=>'customer.lists.type.domain',
51
-			'internalcode'=>'ezulity."domain"',
52
-			'label'=>'Customer list type domain',
53
-			'type'=> 'string',
54
-			'internaltype' => \Aimeos\MW\DB\Statement\Base::PARAM_STR,
55
-		),
56
-		'customer.lists.type.label' => array(
57
-			'code'=>'customer.lists.type.label',
58
-			'internalcode'=>'ezulity."label"',
59
-			'label'=>'Customer list type label',
60
-			'type'=> 'string',
61
-			'internaltype' => \Aimeos\MW\DB\Statement\Base::PARAM_STR,
62
-		),
63
-		'customer.lists.type.status' => array(
64
-			'code'=>'customer.lists.type.status',
65
-			'internalcode'=>'ezulity."status"',
66
-			'label'=>'Customer list type status',
67
-			'type'=> 'integer',
68
-			'internaltype' => \Aimeos\MW\DB\Statement\Base::PARAM_INT,
69
-		),
70
-		'customer.lists.type.ctime'=> array(
71
-			'code'=>'customer.lists.type.ctime',
72
-			'internalcode'=>'ezulity."ctime"',
73
-			'label'=>'Customer list type create date/time',
74
-			'type'=> 'datetime',
75
-			'internaltype'=> \Aimeos\MW\DB\Statement\Base::PARAM_STR,
76
-		),
77
-		'customer.lists.type.mtime'=> array(
78
-			'code'=>'customer.lists.type.mtime',
79
-			'internalcode'=>'ezulity."mtime"',
80
-			'label'=>'Customer list type modification date/time',
81
-			'type'=> 'datetime',
82
-			'internaltype'=> \Aimeos\MW\DB\Statement\Base::PARAM_STR,
83
-		),
84
-		'customer.lists.type.editor'=> array(
85
-			'code'=>'customer.lists.type.editor',
86
-			'internalcode'=>'ezulity."editor"',
87
-			'label'=>'Customer list type editor',
88
-			'type'=> 'string',
89
-			'internaltype'=> \Aimeos\MW\DB\Statement\Base::PARAM_STR,
90
-		),
91
-	);
92
-
93
-
94
-	/**
95
-	 * Removes old entries from the storage.
96
-	 *
97
-	 * @param array $siteids List of IDs for sites whose entries should be deleted
98
-	 */
99
-	public function cleanup( array $siteids )
100
-	{
101
-		$path = 'mshop/customer/manager/lists/type/submanagers';
102
-		foreach( $this->getContext()->getConfig()->get( $path, array() ) as $domain ) {
103
-			$this->getSubManager( $domain )->cleanup( $siteids );
104
-		}
105
-
106
-		$this->cleanupBase( $siteids, 'mshop/customer/manager/lists/type/ezpublish/delete' );
107
-	}
108
-
109
-
110
-	/**
111
-	 * Returns the list attributes that can be used for searching.
112
-	 *
113
-	 * @param boolean $withsub Return also attributes of sub-managers if true
114
-	 * @return array List of attribute items implementing \Aimeos\MW\Criteria\Attribute\Iface
115
-	 */
116
-	public function getSearchAttributes( $withsub = true )
117
-	{
118
-		$path = 'mshop/customer/manager/lists/type/submanagers';
119
-
120
-		return $this->getSearchAttributesBase( $this->searchConfig, $path, array(), $withsub );
121
-	}
122
-
123
-
124
-	/**
125
-	 * Returns a new manager for customer extensions
126
-	 *
127
-	 * @param string $manager Name of the sub manager type in lower case
128
-	 * @param string|null $name Name of the implementation, will be from configuration (or Default) if null
129
-	 * @return mixed Manager for different extensions, e.g stock, tags, locations, etc.
130
-	 */
131
-	public function getSubManager( $manager, $name = null )
132
-	{
133
-		return $this->getSubManagerBase( 'customer', 'lists/type/' . $manager, ( $name === null ? 'Ezpublish' : $name ) );
134
-	}
135
-
136
-
137
-	/**
138
-	 * Returns the config path for retrieving the configuration values.
139
-	 *
140
-	 * @return string Configuration path (mshop/customer/manager/lists/type/ezpublish/)
141
-	 */
142
-	protected function getConfigPath()
143
-	{
144
-		return 'mshop/customer/manager/lists/type/ezpublish/';
145
-	}
146
-
147
-
148
-	/**
149
-	 * Returns the search configuration for searching items.
150
-	 *
151
-	 * @return array Associative list of search keys and search definitions
152
-	 */
153
-	protected function getSearchConfig()
154
-	{
155
-		return $this->searchConfig;
156
-	}
24
+    private $searchConfig = array(
25
+        'customer.lists.type.id' => array(
26
+            'code'=>'customer.lists.type.id',
27
+            'internalcode'=>'ezulity."id"',
28
+            'internaldeps'=>array( 'LEFT JOIN "ezuser_list_type" AS ezulity ON ( ezuli."typeid" = ezulity."id" )' ),
29
+            'label'=>'Customer list type ID',
30
+            'type'=> 'integer',
31
+            'internaltype' => \Aimeos\MW\DB\Statement\Base::PARAM_INT,
32
+            'public' => false,
33
+        ),
34
+        'customer.lists.type.siteid' => array(
35
+            'code'=>'customer.lists.type.siteid',
36
+            'internalcode'=>'ezulity."siteid"',
37
+            'label'=>'Customer list type site ID',
38
+            'type'=> 'integer',
39
+            'internaltype' => \Aimeos\MW\DB\Statement\Base::PARAM_INT,
40
+            'public' => false,
41
+        ),
42
+        'customer.lists.type.code' => array(
43
+            'code'=>'customer.lists.type.code',
44
+            'internalcode'=>'ezulity."code"',
45
+            'label'=>'Customer list type code',
46
+            'type'=> 'string',
47
+            'internaltype' => \Aimeos\MW\DB\Statement\Base::PARAM_STR,
48
+        ),
49
+        'customer.lists.type.domain' => array(
50
+            'code'=>'customer.lists.type.domain',
51
+            'internalcode'=>'ezulity."domain"',
52
+            'label'=>'Customer list type domain',
53
+            'type'=> 'string',
54
+            'internaltype' => \Aimeos\MW\DB\Statement\Base::PARAM_STR,
55
+        ),
56
+        'customer.lists.type.label' => array(
57
+            'code'=>'customer.lists.type.label',
58
+            'internalcode'=>'ezulity."label"',
59
+            'label'=>'Customer list type label',
60
+            'type'=> 'string',
61
+            'internaltype' => \Aimeos\MW\DB\Statement\Base::PARAM_STR,
62
+        ),
63
+        'customer.lists.type.status' => array(
64
+            'code'=>'customer.lists.type.status',
65
+            'internalcode'=>'ezulity."status"',
66
+            'label'=>'Customer list type status',
67
+            'type'=> 'integer',
68
+            'internaltype' => \Aimeos\MW\DB\Statement\Base::PARAM_INT,
69
+        ),
70
+        'customer.lists.type.ctime'=> array(
71
+            'code'=>'customer.lists.type.ctime',
72
+            'internalcode'=>'ezulity."ctime"',
73
+            'label'=>'Customer list type create date/time',
74
+            'type'=> 'datetime',
75
+            'internaltype'=> \Aimeos\MW\DB\Statement\Base::PARAM_STR,
76
+        ),
77
+        'customer.lists.type.mtime'=> array(
78
+            'code'=>'customer.lists.type.mtime',
79
+            'internalcode'=>'ezulity."mtime"',
80
+            'label'=>'Customer list type modification date/time',
81
+            'type'=> 'datetime',
82
+            'internaltype'=> \Aimeos\MW\DB\Statement\Base::PARAM_STR,
83
+        ),
84
+        'customer.lists.type.editor'=> array(
85
+            'code'=>'customer.lists.type.editor',
86
+            'internalcode'=>'ezulity."editor"',
87
+            'label'=>'Customer list type editor',
88
+            'type'=> 'string',
89
+            'internaltype'=> \Aimeos\MW\DB\Statement\Base::PARAM_STR,
90
+        ),
91
+    );
92
+
93
+
94
+    /**
95
+     * Removes old entries from the storage.
96
+     *
97
+     * @param array $siteids List of IDs for sites whose entries should be deleted
98
+     */
99
+    public function cleanup( array $siteids )
100
+    {
101
+        $path = 'mshop/customer/manager/lists/type/submanagers';
102
+        foreach( $this->getContext()->getConfig()->get( $path, array() ) as $domain ) {
103
+            $this->getSubManager( $domain )->cleanup( $siteids );
104
+        }
105
+
106
+        $this->cleanupBase( $siteids, 'mshop/customer/manager/lists/type/ezpublish/delete' );
107
+    }
108
+
109
+
110
+    /**
111
+     * Returns the list attributes that can be used for searching.
112
+     *
113
+     * @param boolean $withsub Return also attributes of sub-managers if true
114
+     * @return array List of attribute items implementing \Aimeos\MW\Criteria\Attribute\Iface
115
+     */
116
+    public function getSearchAttributes( $withsub = true )
117
+    {
118
+        $path = 'mshop/customer/manager/lists/type/submanagers';
119
+
120
+        return $this->getSearchAttributesBase( $this->searchConfig, $path, array(), $withsub );
121
+    }
122
+
123
+
124
+    /**
125
+     * Returns a new manager for customer extensions
126
+     *
127
+     * @param string $manager Name of the sub manager type in lower case
128
+     * @param string|null $name Name of the implementation, will be from configuration (or Default) if null
129
+     * @return mixed Manager for different extensions, e.g stock, tags, locations, etc.
130
+     */
131
+    public function getSubManager( $manager, $name = null )
132
+    {
133
+        return $this->getSubManagerBase( 'customer', 'lists/type/' . $manager, ( $name === null ? 'Ezpublish' : $name ) );
134
+    }
135
+
136
+
137
+    /**
138
+     * Returns the config path for retrieving the configuration values.
139
+     *
140
+     * @return string Configuration path (mshop/customer/manager/lists/type/ezpublish/)
141
+     */
142
+    protected function getConfigPath()
143
+    {
144
+        return 'mshop/customer/manager/lists/type/ezpublish/';
145
+    }
146
+
147
+
148
+    /**
149
+     * Returns the search configuration for searching items.
150
+     *
151
+     * @return array Associative list of search keys and search definitions
152
+     */
153
+    protected function getSearchConfig()
154
+    {
155
+        return $this->searchConfig;
156
+    }
157 157
 }
Please login to merge, or discard this patch.
Spacing   +9 added lines, -9 removed lines patch added patch discarded remove patch
@@ -25,7 +25,7 @@  discard block
 block discarded – undo
25 25
 		'customer.lists.type.id' => array(
26 26
 			'code'=>'customer.lists.type.id',
27 27
 			'internalcode'=>'ezulity."id"',
28
-			'internaldeps'=>array( 'LEFT JOIN "ezuser_list_type" AS ezulity ON ( ezuli."typeid" = ezulity."id" )' ),
28
+			'internaldeps'=>array('LEFT JOIN "ezuser_list_type" AS ezulity ON ( ezuli."typeid" = ezulity."id" )'),
29 29
 			'label'=>'Customer list type ID',
30 30
 			'type'=> 'integer',
31 31
 			'internaltype' => \Aimeos\MW\DB\Statement\Base::PARAM_INT,
@@ -96,14 +96,14 @@  discard block
 block discarded – undo
96 96
 	 *
97 97
 	 * @param array $siteids List of IDs for sites whose entries should be deleted
98 98
 	 */
99
-	public function cleanup( array $siteids )
99
+	public function cleanup(array $siteids)
100 100
 	{
101 101
 		$path = 'mshop/customer/manager/lists/type/submanagers';
102
-		foreach( $this->getContext()->getConfig()->get( $path, array() ) as $domain ) {
103
-			$this->getSubManager( $domain )->cleanup( $siteids );
102
+		foreach ($this->getContext()->getConfig()->get($path, array()) as $domain) {
103
+			$this->getSubManager($domain)->cleanup($siteids);
104 104
 		}
105 105
 
106
-		$this->cleanupBase( $siteids, 'mshop/customer/manager/lists/type/ezpublish/delete' );
106
+		$this->cleanupBase($siteids, 'mshop/customer/manager/lists/type/ezpublish/delete');
107 107
 	}
108 108
 
109 109
 
@@ -113,11 +113,11 @@  discard block
 block discarded – undo
113 113
 	 * @param boolean $withsub Return also attributes of sub-managers if true
114 114
 	 * @return array List of attribute items implementing \Aimeos\MW\Criteria\Attribute\Iface
115 115
 	 */
116
-	public function getSearchAttributes( $withsub = true )
116
+	public function getSearchAttributes($withsub = true)
117 117
 	{
118 118
 		$path = 'mshop/customer/manager/lists/type/submanagers';
119 119
 
120
-		return $this->getSearchAttributesBase( $this->searchConfig, $path, array(), $withsub );
120
+		return $this->getSearchAttributesBase($this->searchConfig, $path, array(), $withsub);
121 121
 	}
122 122
 
123 123
 
@@ -128,9 +128,9 @@  discard block
 block discarded – undo
128 128
 	 * @param string|null $name Name of the implementation, will be from configuration (or Default) if null
129 129
 	 * @return mixed Manager for different extensions, e.g stock, tags, locations, etc.
130 130
 	 */
131
-	public function getSubManager( $manager, $name = null )
131
+	public function getSubManager($manager, $name = null)
132 132
 	{
133
-		return $this->getSubManagerBase( 'customer', 'lists/type/' . $manager, ( $name === null ? 'Ezpublish' : $name ) );
133
+		return $this->getSubManagerBase('customer', 'lists/type/'.$manager, ($name === null ? 'Ezpublish' : $name));
134 134
 	}
135 135
 
136 136
 
Please login to merge, or discard this patch.
lib/custom/src/MShop/Customer/Manager/Group/Ezpublish.php 1 patch
Indentation   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -18,7 +18,7 @@
 block discarded – undo
18 18
  * @subpackage Customer
19 19
  */
20 20
 class Ezpublish
21
-	extends \Aimeos\MShop\Customer\Manager\Group\Standard
22
-	implements \Aimeos\MShop\Customer\Manager\Group\Iface
21
+    extends \Aimeos\MShop\Customer\Manager\Group\Standard
22
+    implements \Aimeos\MShop\Customer\Manager\Group\Iface
23 23
 {
24 24
 }
Please login to merge, or discard this patch.
lib/custom/src/MShop/Customer/Manager/Ezpublish.php 3 patches
Braces   +2 added lines, -4 removed lines patch added patch discarded remove patch
@@ -375,8 +375,7 @@  discard block
 block discarded – undo
375 375
 			$stmt->execute()->finish();
376 376
 
377 377
 			$dbm->release( $conn, $dbname );
378
-		}
379
-		catch( \Exception $e )
378
+		} catch( \Exception $e )
380 379
 		{
381 380
 			$dbm->release( $conn, $dbname );
382 381
 			throw $e;
@@ -412,8 +411,7 @@  discard block
 block discarded – undo
412 411
 			}
413 412
 
414 413
 			$dbm->release( $conn, $dbname );
415
-		}
416
-		catch( \Exception $e )
414
+		} catch( \Exception $e )
417 415
 		{
418 416
 			$dbm->release( $conn, $dbname  );
419 417
 			throw $e;
Please login to merge, or discard this patch.
Indentation   +402 added lines, -402 removed lines patch added patch discarded remove patch
@@ -18,407 +18,407 @@
 block discarded – undo
18 18
  * @subpackage Customer
19 19
  */
20 20
 class Ezpublish
21
-	extends \Aimeos\MShop\Customer\Manager\Standard
21
+    extends \Aimeos\MShop\Customer\Manager\Standard
22 22
 {
23
-	private $searchConfig = array(
24
-		'customer.id' => array(
25
-			'label' => 'Customer ID',
26
-			'code' => 'customer.id',
27
-			'internalcode' => 'ezu."contentobject_id"',
28
-			'type' => 'integer',
29
-			'internaltype' => \Aimeos\MW\DB\Statement\Base::PARAM_INT
30
-		),
31
-		// customer.siteid is not available
32
-		'customer.label' => array(
33
-			'label' => 'Customer label',
34
-			'code' => 'customer.label',
35
-			'internalcode' => 'ezu."login"',
36
-			'type' => 'string',
37
-			'internaltype' => \Aimeos\MW\DB\Statement\Base::PARAM_STR
38
-		),
39
-		'customer.code' => array(
40
-			'label' => 'Customer username',
41
-			'code' => 'customer.code',
42
-			'internalcode' => 'ezu."login_normalized"',
43
-			'type' => 'string',
44
-			'internaltype' => \Aimeos\MW\DB\Statement\Base::PARAM_STR
45
-		),
46
-		'customer.salutation' => array(
47
-			'label' => 'Customer salutation',
48
-			'code' => 'customer.salutation',
49
-			'internalcode' => 'ezu."salutation"',
50
-			'type' => 'string',
51
-			'internaltype' => \Aimeos\MW\DB\Statement\Base::PARAM_STR,
52
-		),
53
-		'customer.company'=> array(
54
-			'label' => 'Customer company',
55
-			'code' => 'customer.company',
56
-			'internalcode' => 'ezu."company"',
57
-			'type' => 'string',
58
-			'internaltype' => \Aimeos\MW\DB\Statement\Base::PARAM_STR,
59
-		),
60
-		'customer.vatid'=> array(
61
-			'label' => 'Customer VAT ID',
62
-			'code' => 'customer.vatid',
63
-			'internalcode' => 'ezu."vatid"',
64
-			'type' => 'string',
65
-			'internaltype' => \Aimeos\MW\DB\Statement\Base::PARAM_STR,
66
-		),
67
-		'customer.title' => array(
68
-			'label' => 'Customer title',
69
-			'code' => 'customer.title',
70
-			'internalcode' => 'ezu."title"',
71
-			'type' => 'string',
72
-			'internaltype' => \Aimeos\MW\DB\Statement\Base::PARAM_STR,
73
-		),
74
-		'customer.firstname' => array(
75
-			'label' => 'Customer firstname',
76
-			'code' => 'customer.firstname',
77
-			'internalcode' => 'ezu."firstname"',
78
-			'type' => 'string',
79
-			'internaltype' => \Aimeos\MW\DB\Statement\Base::PARAM_STR,
80
-		),
81
-		'customer.lastname' => array(
82
-			'label' => 'Customer lastname',
83
-			'code' => 'customer.lastname',
84
-			'internalcode' => 'ezu."lastname"',
85
-			'type' => 'string',
86
-			'internaltype' => \Aimeos\MW\DB\Statement\Base::PARAM_STR,
87
-		),
88
-		'customer.address1' => array(
89
-			'label' => 'Customer address part one',
90
-			'code' => 'customer.address1',
91
-			'internalcode' => 'ezu."address1"',
92
-			'type' => 'string',
93
-			'internaltype' => \Aimeos\MW\DB\Statement\Base::PARAM_STR,
94
-		),
95
-		'customer.address2' => array(
96
-			'label' => 'Customer address part two',
97
-			'code' => 'customer.address2',
98
-			'internalcode' => 'ezu."address2"',
99
-			'type' => 'string',
100
-			'internaltype' => \Aimeos\MW\DB\Statement\Base::PARAM_STR,
101
-		),
102
-		'customer.address3' => array(
103
-			'label' => 'Customer address part three',
104
-			'code' => 'customer.address3',
105
-			'internalcode' => 'ezu."address3"',
106
-			'type' => 'string',
107
-			'internaltype' => \Aimeos\MW\DB\Statement\Base::PARAM_STR,
108
-		),
109
-		'customer.postal' => array(
110
-			'label' => 'Customer postal',
111
-			'code' => 'customer.postal',
112
-			'internalcode' => 'ezu."postal"',
113
-			'type' => 'string',
114
-			'internaltype' => \Aimeos\MW\DB\Statement\Base::PARAM_STR,
115
-		),
116
-		'customer.city' => array(
117
-			'label' => 'Customer city',
118
-			'code' => 'customer.city',
119
-			'internalcode' => 'ezu."city"',
120
-			'type' => 'string',
121
-			'internaltype' => \Aimeos\MW\DB\Statement\Base::PARAM_STR,
122
-		),
123
-		'customer.state' => array(
124
-			'label' => 'Customer state',
125
-			'code' => 'customer.state',
126
-			'internalcode' => 'ezu."state"',
127
-			'type' => 'string',
128
-			'internaltype' => \Aimeos\MW\DB\Statement\Base::PARAM_STR,
129
-		),
130
-		'customer.languageid' => array(
131
-			'label' => 'Customer language',
132
-			'code' => 'customer.languageid',
133
-			'internalcode' => 'ezu."langid"',
134
-			'type' => 'string',
135
-			'internaltype' => \Aimeos\MW\DB\Statement\Base::PARAM_STR,
136
-		),
137
-		'customer.countryid' => array(
138
-			'label' => 'Customer country',
139
-			'code' => 'customer.countryid',
140
-			'internalcode' => 'ezu."countryid"',
141
-			'type' => 'string',
142
-			'internaltype' => \Aimeos\MW\DB\Statement\Base::PARAM_STR,
143
-		),
144
-		'customer.telephone' => array(
145
-			'label' => 'Customer telephone',
146
-			'code' => 'customer.telephone',
147
-			'internalcode' => 'ezu."telephone"',
148
-			'type' => 'string',
149
-			'internaltype' => \Aimeos\MW\DB\Statement\Base::PARAM_STR,
150
-		),
151
-		'customer.email' => array(
152
-			'label' => 'Customer email',
153
-			'code' => 'customer.email',
154
-			'internalcode' => 'ezu."email"',
155
-			'type' => 'string',
156
-			'internaltype' => \Aimeos\MW\DB\Statement\Base::PARAM_STR,
157
-		),
158
-		'customer.telefax' => array(
159
-			'label' => 'Customer telefax',
160
-			'code' => 'customer.telefax',
161
-			'internalcode' => 'ezu."telefax"',
162
-			'type' => 'string',
163
-			'internaltype' => \Aimeos\MW\DB\Statement\Base::PARAM_STR,
164
-		),
165
-		'customer.website' => array(
166
-			'label' => 'Customer website',
167
-			'code' => 'customer.website',
168
-			'internalcode' => 'ezu."website"',
169
-			'type' => 'string',
170
-			'internaltype' => \Aimeos\MW\DB\Statement\Base::PARAM_STR,
171
-		),
172
-		'customer.birthday' => array(
173
-			'label' => 'Customer birthday',
174
-			'code' => 'customer.birthday',
175
-			'internalcode' => 'ezu."birthday"',
176
-			'type' => 'string',
177
-			'internaltype' => \Aimeos\MW\DB\Statement\Base::PARAM_STR,
178
-		),
179
-		'customer.password'=> array(
180
-			'label' => 'Customer password',
181
-			'code' => 'customer.password',
182
-			'internalcode' => 'ezu."password_hash"',
183
-			'type' => 'string',
184
-			'internaltype' => \Aimeos\MW\DB\Statement\Base::PARAM_STR,
185
-		),
186
-		'customer.status'=> array(
187
-			'label' => 'Customer status',
188
-			'code' => 'customer.status',
189
-			'internalcode' => 'ezs."is_enabled"',
190
-			'type' => 'integer',
191
-			'internaltype' => \Aimeos\MW\DB\Statement\Base::PARAM_INT
192
-		),
193
-		'customer.dateverified'=> array(
194
-			'label' => 'Customer verification date',
195
-			'code' => 'customer.dateverified',
196
-			'internalcode' => 'ezu."vdate"',
197
-			'type' => 'date',
198
-			'internaltype' => \Aimeos\MW\DB\Statement\Base::PARAM_STR,
199
-		),
200
-		'customer.ctime'=> array(
201
-			'label' => 'Customer creation time',
202
-			'code' => 'customer.ctime',
203
-			'internalcode' => 'ezu."ctime"',
204
-			'type' => 'datetime',
205
-			'internaltype' => \Aimeos\MW\DB\Statement\Base::PARAM_STR,
206
-		),
207
-		'customer.mtime'=> array(
208
-			'label' => 'Customer modification time',
209
-			'code' => 'customer.mtime',
210
-			'internalcode' => 'ezu."mtime"',
211
-			'type' => 'datetime',
212
-			'internaltype' => \Aimeos\MW\DB\Statement\Base::PARAM_STR,
213
-		),
214
-		'customer.editor'=> array(
215
-			'label'=>'Customer editor',
216
-			'code'=>'customer.editor',
217
-			'internalcode' => 'ezu."editor"',
218
-			'type'=> 'string',
219
-			'internaltype'=> \Aimeos\MW\DB\Statement\Base::PARAM_STR,
220
-		),
221
-	);
222
-
223
-	private $addressManager;
224
-
225
-
226
-	/**
227
-	 * Removes old entries from the storage.
228
-	 *
229
-	 * @param array $siteids List of IDs for sites whose entries should be deleted
230
-	 */
231
-	public function cleanup( array $siteids )
232
-	{
233
-		$path = 'mshop/customer/manager/submanagers';
234
-		foreach( $this->getContext()->getConfig()->get( $path, array( 'address', 'lists' ) ) as $domain ) {
235
-			$this->getSubManager( $domain )->cleanup( $siteids );
236
-		}
237
-	}
238
-
239
-
240
-	/**
241
-	 * Removes multiple items specified by ids in the array.
242
-	 *
243
-	 * @param array $ids List of IDs
244
-	 */
245
-	public function deleteItems( array $ids )
246
-	{
247
-		$path = 'mshop/customer/manager/ezpublish/delete';
248
-		$this->deleteItemsBase( $ids, $path, false, 'contentobject_id' );
249
-	}
250
-
251
-
252
-	/**
253
-	 * Returns the list attributes that can be used for searching.
254
-	 *
255
-	 * @param boolean $withsub Return also attributes of sub-managers if true
256
-	 * @return array List of attribute items implementing \Aimeos\MW\Criteria\Attribute\Iface
257
-	 */
258
-	public function getSearchAttributes( $withsub = true )
259
-	{
260
-		$path = 'mshop/customer/manager/submanagers';
261
-
262
-		return $this->getSearchAttributesBase( $this->searchConfig, $path, array( 'address', 'lists' ), $withsub );
263
-	}
264
-
265
-
266
-	/**
267
-	 * Instantiates a new customer item object.
268
-	 *
269
-	 * @return \Aimeos\MShop\Customer\Item\Iface New customer item object
270
-	 */
271
-	public function createItem()
272
-	{
273
-		return $this->createItemBase();
274
-	}
275
-
276
-
277
-	/**
278
-	 * Saves a customer item object.
279
-	 *
280
-	 * @param \Aimeos\MShop\Customer\Item\Iface $item Customer item object
281
-	 * @param boolean $fetch True if the new ID should be returned in the item
282
-	 */
283
-	public function saveItem( \Aimeos\MShop\Common\Item\Iface $item, $fetch = true )
284
-	{
285
-		$iface = '\\Aimeos\\MShop\\Customer\\Item\\Iface';
286
-		if( !( $item instanceof $iface ) ) {
287
-			throw new \Aimeos\MShop\Customer\Exception( sprintf( 'Object is not of required type "%1$s"', $iface ) );
288
-		}
289
-
290
-		if( !$item->isModified() ) { return; }
291
-
292
-		$context = $this->getContext();
293
-
294
-		$class = '\Aimeos\MShop\Context\Item\Ezpublish';
295
-		if( !is_a( $context, $class ) ) {
296
-			throw new \Aimeos\MShop\Customer\Exception( sprintf( 'Object is not of required type "%1$s"', $class ) );
297
-		}
298
-
299
-		$fcn = $context->getEzUser();
300
-		$email = $item->getPaymentAddress()->getEmail();
301
-		$contentId = $fcn( $item->getId(), $item->getCode(), $email, $item->getPassword(), $item->getStatus() );
302
-		$item->setId( $contentId );
303
-
304
-		$dbm = $context->getDatabaseManager();
305
-		$dbname = $this->getResourceName();
306
-		$conn = $dbm->acquire( $dbname );
307
-
308
-		try
309
-		{
310
-			$date = date( 'Y-m-d H:i:s' );
311
-			$ctime = ( $item->getTimeCreated() ? $item->getTimeCreated() : $date );
312
-			$billingAddress = $item->getPaymentAddress();
313
-
314
-			$path = 'mshop/customer/manager/ezpublish/update';
315
-			$stmt = $this->getCachedStatement( $conn, $path );
316
-
317
-			$stmt->bind( 1, $billingAddress->getCompany() );
318
-			$stmt->bind( 2, $billingAddress->getVatID() );
319
-			$stmt->bind( 3, $billingAddress->getSalutation() );
320
-			$stmt->bind( 4, $billingAddress->getTitle() );
321
-			$stmt->bind( 5, $billingAddress->getFirstname() );
322
-			$stmt->bind( 6, $billingAddress->getLastname() );
323
-			$stmt->bind( 7, $billingAddress->getAddress1() );
324
-			$stmt->bind( 8, $billingAddress->getAddress2() );
325
-			$stmt->bind( 9, $billingAddress->getAddress3() );
326
-			$stmt->bind( 10, $billingAddress->getPostal() );
327
-			$stmt->bind( 11, $billingAddress->getCity() );
328
-			$stmt->bind( 12, $billingAddress->getState() );
329
-			$stmt->bind( 13, $billingAddress->getCountryId() );
330
-			$stmt->bind( 14, $billingAddress->getLanguageId() );
331
-			$stmt->bind( 15, $billingAddress->getTelephone() );
332
-			$stmt->bind( 16, $billingAddress->getTelefax() );
333
-			$stmt->bind( 17, $billingAddress->getWebsite() );
334
-			$stmt->bind( 18, $item->getBirthday() );
335
-			$stmt->bind( 19, $item->getDateVerified() );
336
-			$stmt->bind( 20, $date ); // Modification time
337
-			$stmt->bind( 21, $context->getEditor() );
338
-			$stmt->bind( 22, $ctime ); // Creation time
339
-			$stmt->bind( 23, $item->getId(), \Aimeos\MW\DB\Statement\Base::PARAM_INT );
340
-
341
-			$stmt->execute()->finish();
342
-
343
-			$dbm->release( $conn, $dbname );
344
-		}
345
-		catch( \Exception $e )
346
-		{
347
-			$dbm->release( $conn, $dbname );
348
-			throw $e;
349
-		}
350
-	}
351
-
352
-
353
-	/**
354
-	 * Returns the item objects matched by the given search criteria.
355
-	 *
356
-	 * @param \Aimeos\MW\Criteria\Iface $search Search criteria object
357
-	 * @param integer &$total Number of items that are available in total
358
-	 * @return array List of items implementing \Aimeos\MShop\Customer\Item\Iface
359
-	 * @throws \Aimeos\MShop\Customer\Exception If creating items failed
360
-	 */
361
-	public function searchItems( \Aimeos\MW\Criteria\Iface $search, array $ref = array(), &$total = null )
362
-	{
363
-		$dbm = $this->getContext()->getDatabaseManager();
364
-		$dbname = $this->getResourceName();
365
-		$conn = $dbm->acquire( $dbname );
366
-		$map = array();
367
-
368
-		try
369
-		{
370
-			$level = \Aimeos\MShop\Locale\Manager\Base::SITE_ALL;
371
-			$cfgPathSearch = 'mshop/customer/manager/ezpublish/search';
372
-			$cfgPathCount = 'mshop/customer/manager/ezpublish/count';
373
-			$required = array( 'customer' );
374
-
375
-			$results = $this->searchItemsBase( $conn, $search, $cfgPathSearch, $cfgPathCount, $required, $total, $level );
376
-			while( ( $row = $results->fetch() ) !== false ) {
377
-				$map[ $row['customer.id'] ] = $row;
378
-			}
379
-
380
-			$dbm->release( $conn, $dbname );
381
-		}
382
-		catch( \Exception $e )
383
-		{
384
-			$dbm->release( $conn, $dbname  );
385
-			throw $e;
386
-		}
387
-
388
-		return $this->buildItems( $map, $ref, 'customer' );
389
-	}
390
-
391
-
392
-	/**
393
-	 * Returns a new manager for customer extensions
394
-	 *
395
-	 * @param string $manager Name of the sub manager type in lower case
396
-	 * @param string|null $name Name of the implementation, will be from configuration (or Default) if null
397
-	 * @return mixed Manager for different extensions, e.g stock, tags, locations, etc.
398
-	 */
399
-	public function getSubManager( $manager, $name = null )
400
-	{
401
-		return $this->getSubManagerBase( 'customer', $manager, ( $name === null ? 'Ezpublish' : $name ) );
402
-	}
403
-
404
-
405
-	/**
406
-	 * Creates a new customer item.
407
-	 *
408
-	 * @param array $values List of attributes for customer item
409
-	 * @param array $listItems List items associated to the customer item
410
-	 * @param array $refItems Items referenced by the customer item via the list items
411
-	 * @return \Aimeos\MShop\Customer\Item\Iface New customer item
412
-	 */
413
-	protected function createItemBase( array $values = array(), array $listItems = array(), array $refItems = array() )
414
-	{
415
-		if( !isset( $this->addressManager ) ) {
416
-			$this->addressManager = $this->getSubManager( 'address' );
417
-		}
418
-
419
-		$helper = $this->getPasswordHelper();
420
-		$address = $this->addressManager->createItem();
421
-
422
-		return new \Aimeos\MShop\Customer\Item\Ezpublish( $address, $values, $listItems, $refItems, null, $helper );
423
-	}
23
+    private $searchConfig = array(
24
+        'customer.id' => array(
25
+            'label' => 'Customer ID',
26
+            'code' => 'customer.id',
27
+            'internalcode' => 'ezu."contentobject_id"',
28
+            'type' => 'integer',
29
+            'internaltype' => \Aimeos\MW\DB\Statement\Base::PARAM_INT
30
+        ),
31
+        // customer.siteid is not available
32
+        'customer.label' => array(
33
+            'label' => 'Customer label',
34
+            'code' => 'customer.label',
35
+            'internalcode' => 'ezu."login"',
36
+            'type' => 'string',
37
+            'internaltype' => \Aimeos\MW\DB\Statement\Base::PARAM_STR
38
+        ),
39
+        'customer.code' => array(
40
+            'label' => 'Customer username',
41
+            'code' => 'customer.code',
42
+            'internalcode' => 'ezu."login_normalized"',
43
+            'type' => 'string',
44
+            'internaltype' => \Aimeos\MW\DB\Statement\Base::PARAM_STR
45
+        ),
46
+        'customer.salutation' => array(
47
+            'label' => 'Customer salutation',
48
+            'code' => 'customer.salutation',
49
+            'internalcode' => 'ezu."salutation"',
50
+            'type' => 'string',
51
+            'internaltype' => \Aimeos\MW\DB\Statement\Base::PARAM_STR,
52
+        ),
53
+        'customer.company'=> array(
54
+            'label' => 'Customer company',
55
+            'code' => 'customer.company',
56
+            'internalcode' => 'ezu."company"',
57
+            'type' => 'string',
58
+            'internaltype' => \Aimeos\MW\DB\Statement\Base::PARAM_STR,
59
+        ),
60
+        'customer.vatid'=> array(
61
+            'label' => 'Customer VAT ID',
62
+            'code' => 'customer.vatid',
63
+            'internalcode' => 'ezu."vatid"',
64
+            'type' => 'string',
65
+            'internaltype' => \Aimeos\MW\DB\Statement\Base::PARAM_STR,
66
+        ),
67
+        'customer.title' => array(
68
+            'label' => 'Customer title',
69
+            'code' => 'customer.title',
70
+            'internalcode' => 'ezu."title"',
71
+            'type' => 'string',
72
+            'internaltype' => \Aimeos\MW\DB\Statement\Base::PARAM_STR,
73
+        ),
74
+        'customer.firstname' => array(
75
+            'label' => 'Customer firstname',
76
+            'code' => 'customer.firstname',
77
+            'internalcode' => 'ezu."firstname"',
78
+            'type' => 'string',
79
+            'internaltype' => \Aimeos\MW\DB\Statement\Base::PARAM_STR,
80
+        ),
81
+        'customer.lastname' => array(
82
+            'label' => 'Customer lastname',
83
+            'code' => 'customer.lastname',
84
+            'internalcode' => 'ezu."lastname"',
85
+            'type' => 'string',
86
+            'internaltype' => \Aimeos\MW\DB\Statement\Base::PARAM_STR,
87
+        ),
88
+        'customer.address1' => array(
89
+            'label' => 'Customer address part one',
90
+            'code' => 'customer.address1',
91
+            'internalcode' => 'ezu."address1"',
92
+            'type' => 'string',
93
+            'internaltype' => \Aimeos\MW\DB\Statement\Base::PARAM_STR,
94
+        ),
95
+        'customer.address2' => array(
96
+            'label' => 'Customer address part two',
97
+            'code' => 'customer.address2',
98
+            'internalcode' => 'ezu."address2"',
99
+            'type' => 'string',
100
+            'internaltype' => \Aimeos\MW\DB\Statement\Base::PARAM_STR,
101
+        ),
102
+        'customer.address3' => array(
103
+            'label' => 'Customer address part three',
104
+            'code' => 'customer.address3',
105
+            'internalcode' => 'ezu."address3"',
106
+            'type' => 'string',
107
+            'internaltype' => \Aimeos\MW\DB\Statement\Base::PARAM_STR,
108
+        ),
109
+        'customer.postal' => array(
110
+            'label' => 'Customer postal',
111
+            'code' => 'customer.postal',
112
+            'internalcode' => 'ezu."postal"',
113
+            'type' => 'string',
114
+            'internaltype' => \Aimeos\MW\DB\Statement\Base::PARAM_STR,
115
+        ),
116
+        'customer.city' => array(
117
+            'label' => 'Customer city',
118
+            'code' => 'customer.city',
119
+            'internalcode' => 'ezu."city"',
120
+            'type' => 'string',
121
+            'internaltype' => \Aimeos\MW\DB\Statement\Base::PARAM_STR,
122
+        ),
123
+        'customer.state' => array(
124
+            'label' => 'Customer state',
125
+            'code' => 'customer.state',
126
+            'internalcode' => 'ezu."state"',
127
+            'type' => 'string',
128
+            'internaltype' => \Aimeos\MW\DB\Statement\Base::PARAM_STR,
129
+        ),
130
+        'customer.languageid' => array(
131
+            'label' => 'Customer language',
132
+            'code' => 'customer.languageid',
133
+            'internalcode' => 'ezu."langid"',
134
+            'type' => 'string',
135
+            'internaltype' => \Aimeos\MW\DB\Statement\Base::PARAM_STR,
136
+        ),
137
+        'customer.countryid' => array(
138
+            'label' => 'Customer country',
139
+            'code' => 'customer.countryid',
140
+            'internalcode' => 'ezu."countryid"',
141
+            'type' => 'string',
142
+            'internaltype' => \Aimeos\MW\DB\Statement\Base::PARAM_STR,
143
+        ),
144
+        'customer.telephone' => array(
145
+            'label' => 'Customer telephone',
146
+            'code' => 'customer.telephone',
147
+            'internalcode' => 'ezu."telephone"',
148
+            'type' => 'string',
149
+            'internaltype' => \Aimeos\MW\DB\Statement\Base::PARAM_STR,
150
+        ),
151
+        'customer.email' => array(
152
+            'label' => 'Customer email',
153
+            'code' => 'customer.email',
154
+            'internalcode' => 'ezu."email"',
155
+            'type' => 'string',
156
+            'internaltype' => \Aimeos\MW\DB\Statement\Base::PARAM_STR,
157
+        ),
158
+        'customer.telefax' => array(
159
+            'label' => 'Customer telefax',
160
+            'code' => 'customer.telefax',
161
+            'internalcode' => 'ezu."telefax"',
162
+            'type' => 'string',
163
+            'internaltype' => \Aimeos\MW\DB\Statement\Base::PARAM_STR,
164
+        ),
165
+        'customer.website' => array(
166
+            'label' => 'Customer website',
167
+            'code' => 'customer.website',
168
+            'internalcode' => 'ezu."website"',
169
+            'type' => 'string',
170
+            'internaltype' => \Aimeos\MW\DB\Statement\Base::PARAM_STR,
171
+        ),
172
+        'customer.birthday' => array(
173
+            'label' => 'Customer birthday',
174
+            'code' => 'customer.birthday',
175
+            'internalcode' => 'ezu."birthday"',
176
+            'type' => 'string',
177
+            'internaltype' => \Aimeos\MW\DB\Statement\Base::PARAM_STR,
178
+        ),
179
+        'customer.password'=> array(
180
+            'label' => 'Customer password',
181
+            'code' => 'customer.password',
182
+            'internalcode' => 'ezu."password_hash"',
183
+            'type' => 'string',
184
+            'internaltype' => \Aimeos\MW\DB\Statement\Base::PARAM_STR,
185
+        ),
186
+        'customer.status'=> array(
187
+            'label' => 'Customer status',
188
+            'code' => 'customer.status',
189
+            'internalcode' => 'ezs."is_enabled"',
190
+            'type' => 'integer',
191
+            'internaltype' => \Aimeos\MW\DB\Statement\Base::PARAM_INT
192
+        ),
193
+        'customer.dateverified'=> array(
194
+            'label' => 'Customer verification date',
195
+            'code' => 'customer.dateverified',
196
+            'internalcode' => 'ezu."vdate"',
197
+            'type' => 'date',
198
+            'internaltype' => \Aimeos\MW\DB\Statement\Base::PARAM_STR,
199
+        ),
200
+        'customer.ctime'=> array(
201
+            'label' => 'Customer creation time',
202
+            'code' => 'customer.ctime',
203
+            'internalcode' => 'ezu."ctime"',
204
+            'type' => 'datetime',
205
+            'internaltype' => \Aimeos\MW\DB\Statement\Base::PARAM_STR,
206
+        ),
207
+        'customer.mtime'=> array(
208
+            'label' => 'Customer modification time',
209
+            'code' => 'customer.mtime',
210
+            'internalcode' => 'ezu."mtime"',
211
+            'type' => 'datetime',
212
+            'internaltype' => \Aimeos\MW\DB\Statement\Base::PARAM_STR,
213
+        ),
214
+        'customer.editor'=> array(
215
+            'label'=>'Customer editor',
216
+            'code'=>'customer.editor',
217
+            'internalcode' => 'ezu."editor"',
218
+            'type'=> 'string',
219
+            'internaltype'=> \Aimeos\MW\DB\Statement\Base::PARAM_STR,
220
+        ),
221
+    );
222
+
223
+    private $addressManager;
224
+
225
+
226
+    /**
227
+     * Removes old entries from the storage.
228
+     *
229
+     * @param array $siteids List of IDs for sites whose entries should be deleted
230
+     */
231
+    public function cleanup( array $siteids )
232
+    {
233
+        $path = 'mshop/customer/manager/submanagers';
234
+        foreach( $this->getContext()->getConfig()->get( $path, array( 'address', 'lists' ) ) as $domain ) {
235
+            $this->getSubManager( $domain )->cleanup( $siteids );
236
+        }
237
+    }
238
+
239
+
240
+    /**
241
+     * Removes multiple items specified by ids in the array.
242
+     *
243
+     * @param array $ids List of IDs
244
+     */
245
+    public function deleteItems( array $ids )
246
+    {
247
+        $path = 'mshop/customer/manager/ezpublish/delete';
248
+        $this->deleteItemsBase( $ids, $path, false, 'contentobject_id' );
249
+    }
250
+
251
+
252
+    /**
253
+     * Returns the list attributes that can be used for searching.
254
+     *
255
+     * @param boolean $withsub Return also attributes of sub-managers if true
256
+     * @return array List of attribute items implementing \Aimeos\MW\Criteria\Attribute\Iface
257
+     */
258
+    public function getSearchAttributes( $withsub = true )
259
+    {
260
+        $path = 'mshop/customer/manager/submanagers';
261
+
262
+        return $this->getSearchAttributesBase( $this->searchConfig, $path, array( 'address', 'lists' ), $withsub );
263
+    }
264
+
265
+
266
+    /**
267
+     * Instantiates a new customer item object.
268
+     *
269
+     * @return \Aimeos\MShop\Customer\Item\Iface New customer item object
270
+     */
271
+    public function createItem()
272
+    {
273
+        return $this->createItemBase();
274
+    }
275
+
276
+
277
+    /**
278
+     * Saves a customer item object.
279
+     *
280
+     * @param \Aimeos\MShop\Customer\Item\Iface $item Customer item object
281
+     * @param boolean $fetch True if the new ID should be returned in the item
282
+     */
283
+    public function saveItem( \Aimeos\MShop\Common\Item\Iface $item, $fetch = true )
284
+    {
285
+        $iface = '\\Aimeos\\MShop\\Customer\\Item\\Iface';
286
+        if( !( $item instanceof $iface ) ) {
287
+            throw new \Aimeos\MShop\Customer\Exception( sprintf( 'Object is not of required type "%1$s"', $iface ) );
288
+        }
289
+
290
+        if( !$item->isModified() ) { return; }
291
+
292
+        $context = $this->getContext();
293
+
294
+        $class = '\Aimeos\MShop\Context\Item\Ezpublish';
295
+        if( !is_a( $context, $class ) ) {
296
+            throw new \Aimeos\MShop\Customer\Exception( sprintf( 'Object is not of required type "%1$s"', $class ) );
297
+        }
298
+
299
+        $fcn = $context->getEzUser();
300
+        $email = $item->getPaymentAddress()->getEmail();
301
+        $contentId = $fcn( $item->getId(), $item->getCode(), $email, $item->getPassword(), $item->getStatus() );
302
+        $item->setId( $contentId );
303
+
304
+        $dbm = $context->getDatabaseManager();
305
+        $dbname = $this->getResourceName();
306
+        $conn = $dbm->acquire( $dbname );
307
+
308
+        try
309
+        {
310
+            $date = date( 'Y-m-d H:i:s' );
311
+            $ctime = ( $item->getTimeCreated() ? $item->getTimeCreated() : $date );
312
+            $billingAddress = $item->getPaymentAddress();
313
+
314
+            $path = 'mshop/customer/manager/ezpublish/update';
315
+            $stmt = $this->getCachedStatement( $conn, $path );
316
+
317
+            $stmt->bind( 1, $billingAddress->getCompany() );
318
+            $stmt->bind( 2, $billingAddress->getVatID() );
319
+            $stmt->bind( 3, $billingAddress->getSalutation() );
320
+            $stmt->bind( 4, $billingAddress->getTitle() );
321
+            $stmt->bind( 5, $billingAddress->getFirstname() );
322
+            $stmt->bind( 6, $billingAddress->getLastname() );
323
+            $stmt->bind( 7, $billingAddress->getAddress1() );
324
+            $stmt->bind( 8, $billingAddress->getAddress2() );
325
+            $stmt->bind( 9, $billingAddress->getAddress3() );
326
+            $stmt->bind( 10, $billingAddress->getPostal() );
327
+            $stmt->bind( 11, $billingAddress->getCity() );
328
+            $stmt->bind( 12, $billingAddress->getState() );
329
+            $stmt->bind( 13, $billingAddress->getCountryId() );
330
+            $stmt->bind( 14, $billingAddress->getLanguageId() );
331
+            $stmt->bind( 15, $billingAddress->getTelephone() );
332
+            $stmt->bind( 16, $billingAddress->getTelefax() );
333
+            $stmt->bind( 17, $billingAddress->getWebsite() );
334
+            $stmt->bind( 18, $item->getBirthday() );
335
+            $stmt->bind( 19, $item->getDateVerified() );
336
+            $stmt->bind( 20, $date ); // Modification time
337
+            $stmt->bind( 21, $context->getEditor() );
338
+            $stmt->bind( 22, $ctime ); // Creation time
339
+            $stmt->bind( 23, $item->getId(), \Aimeos\MW\DB\Statement\Base::PARAM_INT );
340
+
341
+            $stmt->execute()->finish();
342
+
343
+            $dbm->release( $conn, $dbname );
344
+        }
345
+        catch( \Exception $e )
346
+        {
347
+            $dbm->release( $conn, $dbname );
348
+            throw $e;
349
+        }
350
+    }
351
+
352
+
353
+    /**
354
+     * Returns the item objects matched by the given search criteria.
355
+     *
356
+     * @param \Aimeos\MW\Criteria\Iface $search Search criteria object
357
+     * @param integer &$total Number of items that are available in total
358
+     * @return array List of items implementing \Aimeos\MShop\Customer\Item\Iface
359
+     * @throws \Aimeos\MShop\Customer\Exception If creating items failed
360
+     */
361
+    public function searchItems( \Aimeos\MW\Criteria\Iface $search, array $ref = array(), &$total = null )
362
+    {
363
+        $dbm = $this->getContext()->getDatabaseManager();
364
+        $dbname = $this->getResourceName();
365
+        $conn = $dbm->acquire( $dbname );
366
+        $map = array();
367
+
368
+        try
369
+        {
370
+            $level = \Aimeos\MShop\Locale\Manager\Base::SITE_ALL;
371
+            $cfgPathSearch = 'mshop/customer/manager/ezpublish/search';
372
+            $cfgPathCount = 'mshop/customer/manager/ezpublish/count';
373
+            $required = array( 'customer' );
374
+
375
+            $results = $this->searchItemsBase( $conn, $search, $cfgPathSearch, $cfgPathCount, $required, $total, $level );
376
+            while( ( $row = $results->fetch() ) !== false ) {
377
+                $map[ $row['customer.id'] ] = $row;
378
+            }
379
+
380
+            $dbm->release( $conn, $dbname );
381
+        }
382
+        catch( \Exception $e )
383
+        {
384
+            $dbm->release( $conn, $dbname  );
385
+            throw $e;
386
+        }
387
+
388
+        return $this->buildItems( $map, $ref, 'customer' );
389
+    }
390
+
391
+
392
+    /**
393
+     * Returns a new manager for customer extensions
394
+     *
395
+     * @param string $manager Name of the sub manager type in lower case
396
+     * @param string|null $name Name of the implementation, will be from configuration (or Default) if null
397
+     * @return mixed Manager for different extensions, e.g stock, tags, locations, etc.
398
+     */
399
+    public function getSubManager( $manager, $name = null )
400
+    {
401
+        return $this->getSubManagerBase( 'customer', $manager, ( $name === null ? 'Ezpublish' : $name ) );
402
+    }
403
+
404
+
405
+    /**
406
+     * Creates a new customer item.
407
+     *
408
+     * @param array $values List of attributes for customer item
409
+     * @param array $listItems List items associated to the customer item
410
+     * @param array $refItems Items referenced by the customer item via the list items
411
+     * @return \Aimeos\MShop\Customer\Item\Iface New customer item
412
+     */
413
+    protected function createItemBase( array $values = array(), array $listItems = array(), array $refItems = array() )
414
+    {
415
+        if( !isset( $this->addressManager ) ) {
416
+            $this->addressManager = $this->getSubManager( 'address' );
417
+        }
418
+
419
+        $helper = $this->getPasswordHelper();
420
+        $address = $this->addressManager->createItem();
421
+
422
+        return new \Aimeos\MShop\Customer\Item\Ezpublish( $address, $values, $listItems, $refItems, null, $helper );
423
+    }
424 424
 }
Please login to merge, or discard this patch.
Spacing   +62 added lines, -62 removed lines patch added patch discarded remove patch
@@ -228,11 +228,11 @@  discard block
 block discarded – undo
228 228
 	 *
229 229
 	 * @param array $siteids List of IDs for sites whose entries should be deleted
230 230
 	 */
231
-	public function cleanup( array $siteids )
231
+	public function cleanup(array $siteids)
232 232
 	{
233 233
 		$path = 'mshop/customer/manager/submanagers';
234
-		foreach( $this->getContext()->getConfig()->get( $path, array( 'address', 'lists' ) ) as $domain ) {
235
-			$this->getSubManager( $domain )->cleanup( $siteids );
234
+		foreach ($this->getContext()->getConfig()->get($path, array('address', 'lists')) as $domain) {
235
+			$this->getSubManager($domain)->cleanup($siteids);
236 236
 		}
237 237
 	}
238 238
 
@@ -242,10 +242,10 @@  discard block
 block discarded – undo
242 242
 	 *
243 243
 	 * @param array $ids List of IDs
244 244
 	 */
245
-	public function deleteItems( array $ids )
245
+	public function deleteItems(array $ids)
246 246
 	{
247 247
 		$path = 'mshop/customer/manager/ezpublish/delete';
248
-		$this->deleteItemsBase( $ids, $path, false, 'contentobject_id' );
248
+		$this->deleteItemsBase($ids, $path, false, 'contentobject_id');
249 249
 	}
250 250
 
251 251
 
@@ -255,11 +255,11 @@  discard block
 block discarded – undo
255 255
 	 * @param boolean $withsub Return also attributes of sub-managers if true
256 256
 	 * @return array List of attribute items implementing \Aimeos\MW\Criteria\Attribute\Iface
257 257
 	 */
258
-	public function getSearchAttributes( $withsub = true )
258
+	public function getSearchAttributes($withsub = true)
259 259
 	{
260 260
 		$path = 'mshop/customer/manager/submanagers';
261 261
 
262
-		return $this->getSearchAttributesBase( $this->searchConfig, $path, array( 'address', 'lists' ), $withsub );
262
+		return $this->getSearchAttributesBase($this->searchConfig, $path, array('address', 'lists'), $withsub);
263 263
 	}
264 264
 
265 265
 
@@ -280,71 +280,71 @@  discard block
 block discarded – undo
280 280
 	 * @param \Aimeos\MShop\Customer\Item\Iface $item Customer item object
281 281
 	 * @param boolean $fetch True if the new ID should be returned in the item
282 282
 	 */
283
-	public function saveItem( \Aimeos\MShop\Common\Item\Iface $item, $fetch = true )
283
+	public function saveItem(\Aimeos\MShop\Common\Item\Iface $item, $fetch = true)
284 284
 	{
285 285
 		$iface = '\\Aimeos\\MShop\\Customer\\Item\\Iface';
286
-		if( !( $item instanceof $iface ) ) {
287
-			throw new \Aimeos\MShop\Customer\Exception( sprintf( 'Object is not of required type "%1$s"', $iface ) );
286
+		if (!($item instanceof $iface)) {
287
+			throw new \Aimeos\MShop\Customer\Exception(sprintf('Object is not of required type "%1$s"', $iface));
288 288
 		}
289 289
 
290
-		if( !$item->isModified() ) { return; }
290
+		if (!$item->isModified()) { return; }
291 291
 
292 292
 		$context = $this->getContext();
293 293
 
294 294
 		$class = '\Aimeos\MShop\Context\Item\Ezpublish';
295
-		if( !is_a( $context, $class ) ) {
296
-			throw new \Aimeos\MShop\Customer\Exception( sprintf( 'Object is not of required type "%1$s"', $class ) );
295
+		if (!is_a($context, $class)) {
296
+			throw new \Aimeos\MShop\Customer\Exception(sprintf('Object is not of required type "%1$s"', $class));
297 297
 		}
298 298
 
299 299
 		$fcn = $context->getEzUser();
300 300
 		$email = $item->getPaymentAddress()->getEmail();
301
-		$contentId = $fcn( $item->getId(), $item->getCode(), $email, $item->getPassword(), $item->getStatus() );
302
-		$item->setId( $contentId );
301
+		$contentId = $fcn($item->getId(), $item->getCode(), $email, $item->getPassword(), $item->getStatus());
302
+		$item->setId($contentId);
303 303
 
304 304
 		$dbm = $context->getDatabaseManager();
305 305
 		$dbname = $this->getResourceName();
306
-		$conn = $dbm->acquire( $dbname );
306
+		$conn = $dbm->acquire($dbname);
307 307
 
308 308
 		try
309 309
 		{
310
-			$date = date( 'Y-m-d H:i:s' );
311
-			$ctime = ( $item->getTimeCreated() ? $item->getTimeCreated() : $date );
310
+			$date = date('Y-m-d H:i:s');
311
+			$ctime = ($item->getTimeCreated() ? $item->getTimeCreated() : $date);
312 312
 			$billingAddress = $item->getPaymentAddress();
313 313
 
314 314
 			$path = 'mshop/customer/manager/ezpublish/update';
315
-			$stmt = $this->getCachedStatement( $conn, $path );
316
-
317
-			$stmt->bind( 1, $billingAddress->getCompany() );
318
-			$stmt->bind( 2, $billingAddress->getVatID() );
319
-			$stmt->bind( 3, $billingAddress->getSalutation() );
320
-			$stmt->bind( 4, $billingAddress->getTitle() );
321
-			$stmt->bind( 5, $billingAddress->getFirstname() );
322
-			$stmt->bind( 6, $billingAddress->getLastname() );
323
-			$stmt->bind( 7, $billingAddress->getAddress1() );
324
-			$stmt->bind( 8, $billingAddress->getAddress2() );
325
-			$stmt->bind( 9, $billingAddress->getAddress3() );
326
-			$stmt->bind( 10, $billingAddress->getPostal() );
327
-			$stmt->bind( 11, $billingAddress->getCity() );
328
-			$stmt->bind( 12, $billingAddress->getState() );
329
-			$stmt->bind( 13, $billingAddress->getCountryId() );
330
-			$stmt->bind( 14, $billingAddress->getLanguageId() );
331
-			$stmt->bind( 15, $billingAddress->getTelephone() );
332
-			$stmt->bind( 16, $billingAddress->getTelefax() );
333
-			$stmt->bind( 17, $billingAddress->getWebsite() );
334
-			$stmt->bind( 18, $item->getBirthday() );
335
-			$stmt->bind( 19, $item->getDateVerified() );
336
-			$stmt->bind( 20, $date ); // Modification time
337
-			$stmt->bind( 21, $context->getEditor() );
338
-			$stmt->bind( 22, $ctime ); // Creation time
339
-			$stmt->bind( 23, $item->getId(), \Aimeos\MW\DB\Statement\Base::PARAM_INT );
315
+			$stmt = $this->getCachedStatement($conn, $path);
316
+
317
+			$stmt->bind(1, $billingAddress->getCompany());
318
+			$stmt->bind(2, $billingAddress->getVatID());
319
+			$stmt->bind(3, $billingAddress->getSalutation());
320
+			$stmt->bind(4, $billingAddress->getTitle());
321
+			$stmt->bind(5, $billingAddress->getFirstname());
322
+			$stmt->bind(6, $billingAddress->getLastname());
323
+			$stmt->bind(7, $billingAddress->getAddress1());
324
+			$stmt->bind(8, $billingAddress->getAddress2());
325
+			$stmt->bind(9, $billingAddress->getAddress3());
326
+			$stmt->bind(10, $billingAddress->getPostal());
327
+			$stmt->bind(11, $billingAddress->getCity());
328
+			$stmt->bind(12, $billingAddress->getState());
329
+			$stmt->bind(13, $billingAddress->getCountryId());
330
+			$stmt->bind(14, $billingAddress->getLanguageId());
331
+			$stmt->bind(15, $billingAddress->getTelephone());
332
+			$stmt->bind(16, $billingAddress->getTelefax());
333
+			$stmt->bind(17, $billingAddress->getWebsite());
334
+			$stmt->bind(18, $item->getBirthday());
335
+			$stmt->bind(19, $item->getDateVerified());
336
+			$stmt->bind(20, $date); // Modification time
337
+			$stmt->bind(21, $context->getEditor());
338
+			$stmt->bind(22, $ctime); // Creation time
339
+			$stmt->bind(23, $item->getId(), \Aimeos\MW\DB\Statement\Base::PARAM_INT);
340 340
 
341 341
 			$stmt->execute()->finish();
342 342
 
343
-			$dbm->release( $conn, $dbname );
343
+			$dbm->release($conn, $dbname);
344 344
 		}
345
-		catch( \Exception $e )
345
+		catch (\Exception $e)
346 346
 		{
347
-			$dbm->release( $conn, $dbname );
347
+			$dbm->release($conn, $dbname);
348 348
 			throw $e;
349 349
 		}
350 350
 	}
@@ -358,11 +358,11 @@  discard block
 block discarded – undo
358 358
 	 * @return array List of items implementing \Aimeos\MShop\Customer\Item\Iface
359 359
 	 * @throws \Aimeos\MShop\Customer\Exception If creating items failed
360 360
 	 */
361
-	public function searchItems( \Aimeos\MW\Criteria\Iface $search, array $ref = array(), &$total = null )
361
+	public function searchItems(\Aimeos\MW\Criteria\Iface $search, array $ref = array(), &$total = null)
362 362
 	{
363 363
 		$dbm = $this->getContext()->getDatabaseManager();
364 364
 		$dbname = $this->getResourceName();
365
-		$conn = $dbm->acquire( $dbname );
365
+		$conn = $dbm->acquire($dbname);
366 366
 		$map = array();
367 367
 
368 368
 		try
@@ -370,22 +370,22 @@  discard block
 block discarded – undo
370 370
 			$level = \Aimeos\MShop\Locale\Manager\Base::SITE_ALL;
371 371
 			$cfgPathSearch = 'mshop/customer/manager/ezpublish/search';
372 372
 			$cfgPathCount = 'mshop/customer/manager/ezpublish/count';
373
-			$required = array( 'customer' );
373
+			$required = array('customer');
374 374
 
375
-			$results = $this->searchItemsBase( $conn, $search, $cfgPathSearch, $cfgPathCount, $required, $total, $level );
376
-			while( ( $row = $results->fetch() ) !== false ) {
377
-				$map[ $row['customer.id'] ] = $row;
375
+			$results = $this->searchItemsBase($conn, $search, $cfgPathSearch, $cfgPathCount, $required, $total, $level);
376
+			while (($row = $results->fetch()) !== false) {
377
+				$map[$row['customer.id']] = $row;
378 378
 			}
379 379
 
380
-			$dbm->release( $conn, $dbname );
380
+			$dbm->release($conn, $dbname);
381 381
 		}
382
-		catch( \Exception $e )
382
+		catch (\Exception $e)
383 383
 		{
384
-			$dbm->release( $conn, $dbname  );
384
+			$dbm->release($conn, $dbname);
385 385
 			throw $e;
386 386
 		}
387 387
 
388
-		return $this->buildItems( $map, $ref, 'customer' );
388
+		return $this->buildItems($map, $ref, 'customer');
389 389
 	}
390 390
 
391 391
 
@@ -396,9 +396,9 @@  discard block
 block discarded – undo
396 396
 	 * @param string|null $name Name of the implementation, will be from configuration (or Default) if null
397 397
 	 * @return mixed Manager for different extensions, e.g stock, tags, locations, etc.
398 398
 	 */
399
-	public function getSubManager( $manager, $name = null )
399
+	public function getSubManager($manager, $name = null)
400 400
 	{
401
-		return $this->getSubManagerBase( 'customer', $manager, ( $name === null ? 'Ezpublish' : $name ) );
401
+		return $this->getSubManagerBase('customer', $manager, ($name === null ? 'Ezpublish' : $name));
402 402
 	}
403 403
 
404 404
 
@@ -410,15 +410,15 @@  discard block
 block discarded – undo
410 410
 	 * @param array $refItems Items referenced by the customer item via the list items
411 411
 	 * @return \Aimeos\MShop\Customer\Item\Iface New customer item
412 412
 	 */
413
-	protected function createItemBase( array $values = array(), array $listItems = array(), array $refItems = array() )
413
+	protected function createItemBase(array $values = array(), array $listItems = array(), array $refItems = array())
414 414
 	{
415
-		if( !isset( $this->addressManager ) ) {
416
-			$this->addressManager = $this->getSubManager( 'address' );
415
+		if (!isset($this->addressManager)) {
416
+			$this->addressManager = $this->getSubManager('address');
417 417
 		}
418 418
 
419 419
 		$helper = $this->getPasswordHelper();
420 420
 		$address = $this->addressManager->createItem();
421 421
 
422
-		return new \Aimeos\MShop\Customer\Item\Ezpublish( $address, $values, $listItems, $refItems, null, $helper );
422
+		return new \Aimeos\MShop\Customer\Item\Ezpublish($address, $values, $listItems, $refItems, null, $helper);
423 423
 	}
424 424
 }
Please login to merge, or discard this patch.
lib/custom/src/MShop/Customer/Manager/Address/Ezpublish.php 2 patches
Indentation   +245 added lines, -245 removed lines patch added patch discarded remove patch
@@ -18,263 +18,263 @@
 block discarded – undo
18 18
  * @subpackage Customer
19 19
  */
20 20
 class Ezpublish
21
-	extends \Aimeos\MShop\Customer\Manager\Address\Standard
22
-	implements \Aimeos\MShop\Customer\Manager\Address\Iface
21
+    extends \Aimeos\MShop\Customer\Manager\Address\Standard
22
+    implements \Aimeos\MShop\Customer\Manager\Address\Iface
23 23
 {
24
-	private $searchConfig = array(
25
-		'customer.address.id' => array(
26
-			'label' => 'Customer address ID',
27
-			'code' => 'customer.address.id',
28
-			'internalcode' => 'ezuad."id"',
29
-			'internaldeps' => array( 'LEFT JOIN "ezuser_address" AS ezuad ON ( ezu."contentobject_id" = ezuad."parentid" )' ),
30
-			'type' => 'integer',
31
-			'internaltype' => \Aimeos\MW\DB\Statement\Base::PARAM_INT,
32
-			'public' => false,
33
-		),
34
-		// site ID is not available
35
-		'customer.address.refid' => array(
36
-			'label' => 'Customer address parent ID',
37
-			'code' => 'customer.address.parentid',
38
-			'internalcode' => 'ezuad."parentid"',
39
-			'type' => 'integer',
40
-			'internaltype' => \Aimeos\MW\DB\Statement\Base::PARAM_STR,
41
-			'public' => false,
42
-		),
43
-		'customer.address.company'=> array(
44
-			'label' => 'Customer address company',
45
-			'code' => 'customer.address.company',
46
-			'internalcode' => 'ezuad."company"',
47
-			'type' => 'string',
48
-			'internaltype' => \Aimeos\MW\DB\Statement\Base::PARAM_STR,
49
-		),
50
-		'customer.address.vatid'=> array(
51
-			'label' => 'Customer address VAT ID',
52
-			'code' => 'customer.address.vatid',
53
-			'internalcode' => 'ezuad."vatid"',
54
-			'type' => 'string',
55
-			'internaltype' => \Aimeos\MW\DB\Statement\Base::PARAM_STR,
56
-		),
57
-		'customer.address.salutation' => array(
58
-			'label' => 'Customer address salutation',
59
-			'code' => 'customer.address.salutation',
60
-			'internalcode' => 'ezuad."salutation"',
61
-			'type' => 'integer',
62
-			'internaltype' => \Aimeos\MW\DB\Statement\Base::PARAM_STR,
63
-		),
64
-		'customer.address.title' => array(
65
-			'label' => 'Customer address title',
66
-			'code' => 'customer.address.title',
67
-			'internalcode' => 'ezuad."title"',
68
-			'type' => 'string',
69
-			'internaltype' => \Aimeos\MW\DB\Statement\Base::PARAM_STR,
70
-		),
71
-		'customer.address.firstname' => array(
72
-			'label' => 'Customer address firstname',
73
-			'code' => 'customer.address.firstname',
74
-			'internalcode' => 'ezuad."firstname"',
75
-			'type' => 'string',
76
-			'internaltype' => \Aimeos\MW\DB\Statement\Base::PARAM_STR,
77
-		),
78
-		'customer.address.lastname' => array(
79
-			'label' => 'Customer address lastname',
80
-			'code' => 'customer.address.lastname',
81
-			'internalcode' => 'ezuad."lastname"',
82
-			'type' => 'string',
83
-			'internaltype' => \Aimeos\MW\DB\Statement\Base::PARAM_STR,
84
-		),
85
-		'customer.address.address1' => array(
86
-			'label' => 'Customer address address part one',
87
-			'code' => 'customer.address.address1',
88
-			'internalcode' => 'ezuad."address1"',
89
-			'type' => 'string',
90
-			'internaltype' => \Aimeos\MW\DB\Statement\Base::PARAM_STR,
91
-		),
92
-		'customer.address.address2' => array(
93
-			'label' => 'Customer address address part two',
94
-			'code' => 'customer.address.address2',
95
-			'internalcode' => 'ezuad."address2"',
96
-			'type' => 'string',
97
-			'internaltype' => \Aimeos\MW\DB\Statement\Base::PARAM_STR,
98
-		),
99
-		'customer.address.address3' => array(
100
-			'label' => 'Customer address address part three',
101
-			'code' => 'customer.address.address3',
102
-			'internalcode' => 'ezuad."address3"',
103
-			'type' => 'string',
104
-			'internaltype' => \Aimeos\MW\DB\Statement\Base::PARAM_STR,
105
-		),
106
-		'customer.address.postal' => array(
107
-			'label' => 'Customer address postal',
108
-			'code' => 'customer.address.postal',
109
-			'internalcode' => 'ezuad."postal"',
110
-			'type' => 'string',
111
-			'internaltype' => \Aimeos\MW\DB\Statement\Base::PARAM_STR,
112
-		),
113
-		'customer.address.city' => array(
114
-			'label' => 'Customer address city',
115
-			'code' => 'customer.address.city',
116
-			'internalcode' => 'ezuad."city"',
117
-			'type' => 'string',
118
-			'internaltype' => \Aimeos\MW\DB\Statement\Base::PARAM_STR,
119
-		),
120
-		'customer.address.state' => array(
121
-			'label' => 'Customer address state',
122
-			'code' => 'customer.address.state',
123
-			'internalcode' => 'ezuad."state"',
124
-			'type' => 'string',
125
-			'internaltype' => \Aimeos\MW\DB\Statement\Base::PARAM_STR,
126
-		),
127
-		'customer.address.languageid' => array(
128
-			'label' => 'Customer address language',
129
-			'code' => 'customer.address.languageid',
130
-			'internalcode' => 'ezuad."langid"',
131
-			'type' => 'string',
132
-			'internaltype' => \Aimeos\MW\DB\Statement\Base::PARAM_STR,
133
-		),
134
-		'customer.address.countryid' => array(
135
-			'label' => 'Customer address country',
136
-			'code' => 'customer.address.countryid',
137
-			'internalcode' => 'ezuad."countryid"',
138
-			'type' => 'string',
139
-			'internaltype' => \Aimeos\MW\DB\Statement\Base::PARAM_STR,
140
-		),
141
-		'customer.address.telephone' => array(
142
-			'label' => 'Customer address telephone',
143
-			'code' => 'customer.address.telephone',
144
-			'internalcode' => 'ezuad."telephone"',
145
-			'type' => 'string',
146
-			'internaltype' => \Aimeos\MW\DB\Statement\Base::PARAM_STR,
147
-		),
148
-		'customer.address.email' => array(
149
-			'label' => 'Customer address email',
150
-			'code' => 'customer.address.email',
151
-			'internalcode' => 'ezuad."email"',
152
-			'type' => 'string',
153
-			'internaltype' => \Aimeos\MW\DB\Statement\Base::PARAM_STR,
154
-		),
155
-		'customer.address.telefax' => array(
156
-			'label' => 'Customer address telefax',
157
-			'code' => 'customer.address.telefax',
158
-			'internalcode' => 'ezuad."telefax"',
159
-			'type' => 'string',
160
-			'internaltype' => \Aimeos\MW\DB\Statement\Base::PARAM_STR,
161
-		),
162
-		'customer.address.website' => array(
163
-			'label' => 'Customer address website',
164
-			'code' => 'customer.address.website',
165
-			'internalcode' => 'ezuad."website"',
166
-			'type' => 'string',
167
-			'internaltype' => \Aimeos\MW\DB\Statement\Base::PARAM_STR,
168
-		),
169
-		'customer.address.flag' => array(
170
-			'label' => 'Customer address flag',
171
-			'code' => 'customer.address.flag',
172
-			'internalcode' => 'ezuad."flag"',
173
-			'type' => 'integer',
174
-			'internaltype' => \Aimeos\MW\DB\Statement\Base::PARAM_INT,
175
-		),
176
-		'customer.address.position' => array(
177
-			'label' => 'Customer address position',
178
-			'code' => 'customer.address.position',
179
-			'internalcode' => 'ezuad."pos"',
180
-			'type' => 'integer',
181
-			'internaltype' => \Aimeos\MW\DB\Statement\Base::PARAM_INT,
182
-		),
183
-		'customer.address.ctime'=> array(
184
-			'label'=>'Customer address create date/time',
185
-			'code'=>'customer.address.ctime',
186
-			'internalcode'=>'ezuad."ctime"',
187
-			'type'=> 'datetime',
188
-			'internaltype'=> \Aimeos\MW\DB\Statement\Base::PARAM_STR,
189
-		),
190
-		'customer.address.mtime'=> array(
191
-			'label'=>'Customer address modification date/time',
192
-			'code'=>'customer.address.mtime',
193
-			'internalcode'=>'ezuad."mtime"',
194
-			'type'=> 'datetime',
195
-			'internaltype'=> \Aimeos\MW\DB\Statement\Base::PARAM_STR,
196
-		),
197
-		'customer.address.editor'=> array(
198
-			'label'=>'Customer address editor',
199
-			'code'=>'customer.address.editor',
200
-			'internalcode'=>'ezuad."editor"',
201
-			'type'=> 'string',
202
-			'internaltype'=> \Aimeos\MW\DB\Statement\Base::PARAM_STR,
203
-		),
204
-	);
24
+    private $searchConfig = array(
25
+        'customer.address.id' => array(
26
+            'label' => 'Customer address ID',
27
+            'code' => 'customer.address.id',
28
+            'internalcode' => 'ezuad."id"',
29
+            'internaldeps' => array( 'LEFT JOIN "ezuser_address" AS ezuad ON ( ezu."contentobject_id" = ezuad."parentid" )' ),
30
+            'type' => 'integer',
31
+            'internaltype' => \Aimeos\MW\DB\Statement\Base::PARAM_INT,
32
+            'public' => false,
33
+        ),
34
+        // site ID is not available
35
+        'customer.address.refid' => array(
36
+            'label' => 'Customer address parent ID',
37
+            'code' => 'customer.address.parentid',
38
+            'internalcode' => 'ezuad."parentid"',
39
+            'type' => 'integer',
40
+            'internaltype' => \Aimeos\MW\DB\Statement\Base::PARAM_STR,
41
+            'public' => false,
42
+        ),
43
+        'customer.address.company'=> array(
44
+            'label' => 'Customer address company',
45
+            'code' => 'customer.address.company',
46
+            'internalcode' => 'ezuad."company"',
47
+            'type' => 'string',
48
+            'internaltype' => \Aimeos\MW\DB\Statement\Base::PARAM_STR,
49
+        ),
50
+        'customer.address.vatid'=> array(
51
+            'label' => 'Customer address VAT ID',
52
+            'code' => 'customer.address.vatid',
53
+            'internalcode' => 'ezuad."vatid"',
54
+            'type' => 'string',
55
+            'internaltype' => \Aimeos\MW\DB\Statement\Base::PARAM_STR,
56
+        ),
57
+        'customer.address.salutation' => array(
58
+            'label' => 'Customer address salutation',
59
+            'code' => 'customer.address.salutation',
60
+            'internalcode' => 'ezuad."salutation"',
61
+            'type' => 'integer',
62
+            'internaltype' => \Aimeos\MW\DB\Statement\Base::PARAM_STR,
63
+        ),
64
+        'customer.address.title' => array(
65
+            'label' => 'Customer address title',
66
+            'code' => 'customer.address.title',
67
+            'internalcode' => 'ezuad."title"',
68
+            'type' => 'string',
69
+            'internaltype' => \Aimeos\MW\DB\Statement\Base::PARAM_STR,
70
+        ),
71
+        'customer.address.firstname' => array(
72
+            'label' => 'Customer address firstname',
73
+            'code' => 'customer.address.firstname',
74
+            'internalcode' => 'ezuad."firstname"',
75
+            'type' => 'string',
76
+            'internaltype' => \Aimeos\MW\DB\Statement\Base::PARAM_STR,
77
+        ),
78
+        'customer.address.lastname' => array(
79
+            'label' => 'Customer address lastname',
80
+            'code' => 'customer.address.lastname',
81
+            'internalcode' => 'ezuad."lastname"',
82
+            'type' => 'string',
83
+            'internaltype' => \Aimeos\MW\DB\Statement\Base::PARAM_STR,
84
+        ),
85
+        'customer.address.address1' => array(
86
+            'label' => 'Customer address address part one',
87
+            'code' => 'customer.address.address1',
88
+            'internalcode' => 'ezuad."address1"',
89
+            'type' => 'string',
90
+            'internaltype' => \Aimeos\MW\DB\Statement\Base::PARAM_STR,
91
+        ),
92
+        'customer.address.address2' => array(
93
+            'label' => 'Customer address address part two',
94
+            'code' => 'customer.address.address2',
95
+            'internalcode' => 'ezuad."address2"',
96
+            'type' => 'string',
97
+            'internaltype' => \Aimeos\MW\DB\Statement\Base::PARAM_STR,
98
+        ),
99
+        'customer.address.address3' => array(
100
+            'label' => 'Customer address address part three',
101
+            'code' => 'customer.address.address3',
102
+            'internalcode' => 'ezuad."address3"',
103
+            'type' => 'string',
104
+            'internaltype' => \Aimeos\MW\DB\Statement\Base::PARAM_STR,
105
+        ),
106
+        'customer.address.postal' => array(
107
+            'label' => 'Customer address postal',
108
+            'code' => 'customer.address.postal',
109
+            'internalcode' => 'ezuad."postal"',
110
+            'type' => 'string',
111
+            'internaltype' => \Aimeos\MW\DB\Statement\Base::PARAM_STR,
112
+        ),
113
+        'customer.address.city' => array(
114
+            'label' => 'Customer address city',
115
+            'code' => 'customer.address.city',
116
+            'internalcode' => 'ezuad."city"',
117
+            'type' => 'string',
118
+            'internaltype' => \Aimeos\MW\DB\Statement\Base::PARAM_STR,
119
+        ),
120
+        'customer.address.state' => array(
121
+            'label' => 'Customer address state',
122
+            'code' => 'customer.address.state',
123
+            'internalcode' => 'ezuad."state"',
124
+            'type' => 'string',
125
+            'internaltype' => \Aimeos\MW\DB\Statement\Base::PARAM_STR,
126
+        ),
127
+        'customer.address.languageid' => array(
128
+            'label' => 'Customer address language',
129
+            'code' => 'customer.address.languageid',
130
+            'internalcode' => 'ezuad."langid"',
131
+            'type' => 'string',
132
+            'internaltype' => \Aimeos\MW\DB\Statement\Base::PARAM_STR,
133
+        ),
134
+        'customer.address.countryid' => array(
135
+            'label' => 'Customer address country',
136
+            'code' => 'customer.address.countryid',
137
+            'internalcode' => 'ezuad."countryid"',
138
+            'type' => 'string',
139
+            'internaltype' => \Aimeos\MW\DB\Statement\Base::PARAM_STR,
140
+        ),
141
+        'customer.address.telephone' => array(
142
+            'label' => 'Customer address telephone',
143
+            'code' => 'customer.address.telephone',
144
+            'internalcode' => 'ezuad."telephone"',
145
+            'type' => 'string',
146
+            'internaltype' => \Aimeos\MW\DB\Statement\Base::PARAM_STR,
147
+        ),
148
+        'customer.address.email' => array(
149
+            'label' => 'Customer address email',
150
+            'code' => 'customer.address.email',
151
+            'internalcode' => 'ezuad."email"',
152
+            'type' => 'string',
153
+            'internaltype' => \Aimeos\MW\DB\Statement\Base::PARAM_STR,
154
+        ),
155
+        'customer.address.telefax' => array(
156
+            'label' => 'Customer address telefax',
157
+            'code' => 'customer.address.telefax',
158
+            'internalcode' => 'ezuad."telefax"',
159
+            'type' => 'string',
160
+            'internaltype' => \Aimeos\MW\DB\Statement\Base::PARAM_STR,
161
+        ),
162
+        'customer.address.website' => array(
163
+            'label' => 'Customer address website',
164
+            'code' => 'customer.address.website',
165
+            'internalcode' => 'ezuad."website"',
166
+            'type' => 'string',
167
+            'internaltype' => \Aimeos\MW\DB\Statement\Base::PARAM_STR,
168
+        ),
169
+        'customer.address.flag' => array(
170
+            'label' => 'Customer address flag',
171
+            'code' => 'customer.address.flag',
172
+            'internalcode' => 'ezuad."flag"',
173
+            'type' => 'integer',
174
+            'internaltype' => \Aimeos\MW\DB\Statement\Base::PARAM_INT,
175
+        ),
176
+        'customer.address.position' => array(
177
+            'label' => 'Customer address position',
178
+            'code' => 'customer.address.position',
179
+            'internalcode' => 'ezuad."pos"',
180
+            'type' => 'integer',
181
+            'internaltype' => \Aimeos\MW\DB\Statement\Base::PARAM_INT,
182
+        ),
183
+        'customer.address.ctime'=> array(
184
+            'label'=>'Customer address create date/time',
185
+            'code'=>'customer.address.ctime',
186
+            'internalcode'=>'ezuad."ctime"',
187
+            'type'=> 'datetime',
188
+            'internaltype'=> \Aimeos\MW\DB\Statement\Base::PARAM_STR,
189
+        ),
190
+        'customer.address.mtime'=> array(
191
+            'label'=>'Customer address modification date/time',
192
+            'code'=>'customer.address.mtime',
193
+            'internalcode'=>'ezuad."mtime"',
194
+            'type'=> 'datetime',
195
+            'internaltype'=> \Aimeos\MW\DB\Statement\Base::PARAM_STR,
196
+        ),
197
+        'customer.address.editor'=> array(
198
+            'label'=>'Customer address editor',
199
+            'code'=>'customer.address.editor',
200
+            'internalcode'=>'ezuad."editor"',
201
+            'type'=> 'string',
202
+            'internaltype'=> \Aimeos\MW\DB\Statement\Base::PARAM_STR,
203
+        ),
204
+    );
205 205
 
206 206
 
207
-	/**
208
-	 * Removes old entries from the storage.
209
-	 *
210
-	 * @param array $siteids List of IDs for sites whose entries should be deleted
211
-	 */
212
-	public function cleanup( array $siteids )
213
-	{
214
-		$path = 'mshop/customer/manager/address/submanagers';
215
-		foreach( $this->getContext()->getConfig()->get( $path, array() ) as $domain ) {
216
-			$this->getSubManager( $domain )->cleanup( $siteids );
217
-		}
218
-	}
207
+    /**
208
+     * Removes old entries from the storage.
209
+     *
210
+     * @param array $siteids List of IDs for sites whose entries should be deleted
211
+     */
212
+    public function cleanup( array $siteids )
213
+    {
214
+        $path = 'mshop/customer/manager/address/submanagers';
215
+        foreach( $this->getContext()->getConfig()->get( $path, array() ) as $domain ) {
216
+            $this->getSubManager( $domain )->cleanup( $siteids );
217
+        }
218
+    }
219 219
 
220 220
 
221
-	/**
222
-	 * Removes multiple items specified by ids in the array.
223
-	 *
224
-	 * @param array $ids List of IDs
225
-	 */
226
-	public function deleteItems( array $ids )
227
-	{
228
-		$path = 'mshop/customer/manager/address/ezpublish/delete';
229
-		$this->deleteItemsBase( $ids, $path, false );
230
-	}
221
+    /**
222
+     * Removes multiple items specified by ids in the array.
223
+     *
224
+     * @param array $ids List of IDs
225
+     */
226
+    public function deleteItems( array $ids )
227
+    {
228
+        $path = 'mshop/customer/manager/address/ezpublish/delete';
229
+        $this->deleteItemsBase( $ids, $path, false );
230
+    }
231 231
 
232 232
 
233
-	/**
234
-	 * Returns the list attributes that can be used for searching.
235
-	 *
236
-	 * @param boolean $withsub Return also attributes of sub-managers if true
237
-	 * @return array List of attribute items implementing \Aimeos\MW\Criteria\Attribute\Iface
238
-	 */
239
-	public function getSearchAttributes( $withsub = true )
240
-	{
241
-		$path = 'mshop/customer/manager/address/submanagers';
233
+    /**
234
+     * Returns the list attributes that can be used for searching.
235
+     *
236
+     * @param boolean $withsub Return also attributes of sub-managers if true
237
+     * @return array List of attribute items implementing \Aimeos\MW\Criteria\Attribute\Iface
238
+     */
239
+    public function getSearchAttributes( $withsub = true )
240
+    {
241
+        $path = 'mshop/customer/manager/address/submanagers';
242 242
 
243
-		return $this->getSearchAttributesBase( $this->searchConfig, $path, array(), $withsub );
244
-	}
243
+        return $this->getSearchAttributesBase( $this->searchConfig, $path, array(), $withsub );
244
+    }
245 245
 
246 246
 
247
-	/**
248
-	 * Returns a new manager for customer extensions
249
-	 *
250
-	 * @param string $manager Name of the sub manager type in lower case
251
-	 * @param string|null $name Name of the implementation, will be from configuration (or Default) if null
252
-	 * @return mixed Manager for different extensions, e.g stock, tags, locations, etc.
253
-	 */
254
-	public function getSubManager( $manager, $name = null )
255
-	{
256
-		return $this->getSubManagerBase( 'customer', 'address/' . $manager, ( $name === null ? 'Ezpublish' : $name ) );
257
-	}
247
+    /**
248
+     * Returns a new manager for customer extensions
249
+     *
250
+     * @param string $manager Name of the sub manager type in lower case
251
+     * @param string|null $name Name of the implementation, will be from configuration (or Default) if null
252
+     * @return mixed Manager for different extensions, e.g stock, tags, locations, etc.
253
+     */
254
+    public function getSubManager( $manager, $name = null )
255
+    {
256
+        return $this->getSubManagerBase( 'customer', 'address/' . $manager, ( $name === null ? 'Ezpublish' : $name ) );
257
+    }
258 258
 
259 259
 
260
-	/**
261
-	 * Returns the config path for retrieving the configuration values.
262
-	 *
263
-	 * @return string Configuration path (mshop/customer/manager/address/ezpublish/)
264
-	 */
265
-	protected function getConfigPath()
266
-	{
267
-		return 'mshop/customer/manager/address/ezpublish/';
268
-	}
260
+    /**
261
+     * Returns the config path for retrieving the configuration values.
262
+     *
263
+     * @return string Configuration path (mshop/customer/manager/address/ezpublish/)
264
+     */
265
+    protected function getConfigPath()
266
+    {
267
+        return 'mshop/customer/manager/address/ezpublish/';
268
+    }
269 269
 
270 270
 
271
-	/**
272
-	 * Returns the search configuration for searching items.
273
-	 *
274
-	 * @return array Associative list of search keys and search definitions
275
-	 */
276
-	protected function getSearchConfig()
277
-	{
278
-		return $this->searchConfig;
279
-	}
271
+    /**
272
+     * Returns the search configuration for searching items.
273
+     *
274
+     * @return array Associative list of search keys and search definitions
275
+     */
276
+    protected function getSearchConfig()
277
+    {
278
+        return $this->searchConfig;
279
+    }
280 280
 }
Please login to merge, or discard this patch.
Spacing   +10 added lines, -10 removed lines patch added patch discarded remove patch
@@ -26,7 +26,7 @@  discard block
 block discarded – undo
26 26
 			'label' => 'Customer address ID',
27 27
 			'code' => 'customer.address.id',
28 28
 			'internalcode' => 'ezuad."id"',
29
-			'internaldeps' => array( 'LEFT JOIN "ezuser_address" AS ezuad ON ( ezu."contentobject_id" = ezuad."parentid" )' ),
29
+			'internaldeps' => array('LEFT JOIN "ezuser_address" AS ezuad ON ( ezu."contentobject_id" = ezuad."parentid" )'),
30 30
 			'type' => 'integer',
31 31
 			'internaltype' => \Aimeos\MW\DB\Statement\Base::PARAM_INT,
32 32
 			'public' => false,
@@ -209,11 +209,11 @@  discard block
 block discarded – undo
209 209
 	 *
210 210
 	 * @param array $siteids List of IDs for sites whose entries should be deleted
211 211
 	 */
212
-	public function cleanup( array $siteids )
212
+	public function cleanup(array $siteids)
213 213
 	{
214 214
 		$path = 'mshop/customer/manager/address/submanagers';
215
-		foreach( $this->getContext()->getConfig()->get( $path, array() ) as $domain ) {
216
-			$this->getSubManager( $domain )->cleanup( $siteids );
215
+		foreach ($this->getContext()->getConfig()->get($path, array()) as $domain) {
216
+			$this->getSubManager($domain)->cleanup($siteids);
217 217
 		}
218 218
 	}
219 219
 
@@ -223,10 +223,10 @@  discard block
 block discarded – undo
223 223
 	 *
224 224
 	 * @param array $ids List of IDs
225 225
 	 */
226
-	public function deleteItems( array $ids )
226
+	public function deleteItems(array $ids)
227 227
 	{
228 228
 		$path = 'mshop/customer/manager/address/ezpublish/delete';
229
-		$this->deleteItemsBase( $ids, $path, false );
229
+		$this->deleteItemsBase($ids, $path, false);
230 230
 	}
231 231
 
232 232
 
@@ -236,11 +236,11 @@  discard block
 block discarded – undo
236 236
 	 * @param boolean $withsub Return also attributes of sub-managers if true
237 237
 	 * @return array List of attribute items implementing \Aimeos\MW\Criteria\Attribute\Iface
238 238
 	 */
239
-	public function getSearchAttributes( $withsub = true )
239
+	public function getSearchAttributes($withsub = true)
240 240
 	{
241 241
 		$path = 'mshop/customer/manager/address/submanagers';
242 242
 
243
-		return $this->getSearchAttributesBase( $this->searchConfig, $path, array(), $withsub );
243
+		return $this->getSearchAttributesBase($this->searchConfig, $path, array(), $withsub);
244 244
 	}
245 245
 
246 246
 
@@ -251,9 +251,9 @@  discard block
 block discarded – undo
251 251
 	 * @param string|null $name Name of the implementation, will be from configuration (or Default) if null
252 252
 	 * @return mixed Manager for different extensions, e.g stock, tags, locations, etc.
253 253
 	 */
254
-	public function getSubManager( $manager, $name = null )
254
+	public function getSubManager($manager, $name = null)
255 255
 	{
256
-		return $this->getSubManagerBase( 'customer', 'address/' . $manager, ( $name === null ? 'Ezpublish' : $name ) );
256
+		return $this->getSubManagerBase('customer', 'address/'.$manager, ($name === null ? 'Ezpublish' : $name));
257 257
 	}
258 258
 
259 259
 
Please login to merge, or discard this patch.
lib/custom/setup/EzuserAddAddress.php 3 patches
Braces   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -50,8 +50,7 @@
 block discarded – undo
50 50
 		{
51 51
 			$this->executeList( $sql, 'db-customer' );
52 52
 			$this->status( 'done' );
53
-		}
54
-		else
53
+		} else
55 54
 		{
56 55
 			$this->status( 'OK' );
57 56
 		}
Please login to merge, or discard this patch.
Spacing   +50 added lines, -50 removed lines patch added patch discarded remove patch
@@ -21,7 +21,7 @@  discard block
 block discarded – undo
21 21
 	 */
22 22
 	public function getPreDependencies()
23 23
 	{
24
-		return array( 'TablesCreateEzpublish' );
24
+		return array('TablesCreateEzpublish');
25 25
 	}
26 26
 
27 27
 
@@ -30,12 +30,12 @@  discard block
 block discarded – undo
30 30
 	 */
31 31
 	public function migrate()
32 32
 	{
33
-		$this->msg( 'Adding address fields to ezuser table', 0 );
33
+		$this->msg('Adding address fields to ezuser table', 0);
34 34
 
35
-		$dbal = $this->getConnection( 'db-customer' )->getRawObject();
35
+		$dbal = $this->getConnection('db-customer')->getRawObject();
36 36
 
37
-		if( !( $dbal instanceof \Doctrine\DBAL\Connection ) ) {
38
-			throw new \Aimeos\MW\Setup\Exception( 'Not a DBAL connection' );
37
+		if (!($dbal instanceof \Doctrine\DBAL\Connection)) {
38
+			throw new \Aimeos\MW\Setup\Exception('Not a DBAL connection');
39 39
 		}
40 40
 
41 41
 
@@ -43,17 +43,17 @@  discard block
 block discarded – undo
43 43
 		$comparator = new \Doctrine\DBAL\Schema\Comparator();
44 44
 		$toSchema = clone $fromSchema;
45 45
 
46
-		$this->addIndexes( $this->addColumns( $toSchema->getTable( 'ezuser' ) ) );
47
-		$sql = $fromSchema->getMigrateToSql( $toSchema, $dbal->getDatabasePlatform() );
46
+		$this->addIndexes($this->addColumns($toSchema->getTable('ezuser')));
47
+		$sql = $fromSchema->getMigrateToSql($toSchema, $dbal->getDatabasePlatform());
48 48
 
49
-		if( $sql !== array() )
49
+		if ($sql !== array())
50 50
 		{
51
-			$this->executeList( $sql, 'db-customer' );
52
-			$this->status( 'done' );
51
+			$this->executeList($sql, 'db-customer');
52
+			$this->status('done');
53 53
 		}
54 54
 		else
55 55
 		{
56
-			$this->status( 'OK' );
56
+			$this->status('OK');
57 57
 		}
58 58
 	}
59 59
 
@@ -64,38 +64,38 @@  discard block
 block discarded – undo
64 64
 	 * @param \Doctrine\DBAL\Schema\Table $table Table object
65 65
 	 * @return \Doctrine\DBAL\Schema\Table Updated table object
66 66
 	 */
67
-	protected function addColumns( \Doctrine\DBAL\Schema\Table $table )
67
+	protected function addColumns(\Doctrine\DBAL\Schema\Table $table)
68 68
 	{
69 69
 		$columns = array(
70
-			'company' => array( 'string', array( 'length' => 100 ) ),
71
-			'vatid' => array( 'string', array( 'length' => 32 ) ),
72
-			'salutation' => array( 'string', array( 'length' => 8 ) ),
73
-			'title' => array( 'string', array( 'length' => 64 ) ),
74
-			'firstname' => array( 'string', array( 'length' => 64 ) ),
75
-			'lastname' => array( 'string', array( 'length' => 64 ) ),
76
-			'address1' => array( 'string', array( 'length' => 255 ) ),
77
-			'address2' => array( 'string', array( 'length' => 255 ) ),
78
-			'address3' => array( 'string', array( 'length' => 255 ) ),
79
-			'postal' => array( 'string', array( 'length' => 16 ) ),
80
-			'city' => array( 'string', array( 'length' => 255 ) ),
81
-			'state' => array( 'string', array( 'length' => 255 ) ),
82
-			'langid' => array( 'string', array( 'length' => 5, 'notnull' => false ) ),
83
-			'countryid' => array( 'string', array( 'length' => 2, 'notnull' => false, 'fixed' => true ) ),
84
-			'telephone' => array( 'string', array( 'length' => 32 ) ),
85
-			'telefax' => array( 'string', array( 'length' => 32 ) ),
86
-			'website' => array( 'string', array( 'length' => 255 ) ),
87
-			'birthday' => array( 'date', array( 'notnull' => false ) ),
88
-			'vdate' => array( 'date', array( 'notnull' => false ) ),
89
-			'status' => array( 'smallint', array() ),
90
-			'mtime' => array( 'datetime', array() ),
91
-			'ctime' => array( 'datetime', array() ),
92
-			'editor' => array( 'string', array( 'length' => 255 ) ),
70
+			'company' => array('string', array('length' => 100)),
71
+			'vatid' => array('string', array('length' => 32)),
72
+			'salutation' => array('string', array('length' => 8)),
73
+			'title' => array('string', array('length' => 64)),
74
+			'firstname' => array('string', array('length' => 64)),
75
+			'lastname' => array('string', array('length' => 64)),
76
+			'address1' => array('string', array('length' => 255)),
77
+			'address2' => array('string', array('length' => 255)),
78
+			'address3' => array('string', array('length' => 255)),
79
+			'postal' => array('string', array('length' => 16)),
80
+			'city' => array('string', array('length' => 255)),
81
+			'state' => array('string', array('length' => 255)),
82
+			'langid' => array('string', array('length' => 5, 'notnull' => false)),
83
+			'countryid' => array('string', array('length' => 2, 'notnull' => false, 'fixed' => true)),
84
+			'telephone' => array('string', array('length' => 32)),
85
+			'telefax' => array('string', array('length' => 32)),
86
+			'website' => array('string', array('length' => 255)),
87
+			'birthday' => array('date', array('notnull' => false)),
88
+			'vdate' => array('date', array('notnull' => false)),
89
+			'status' => array('smallint', array()),
90
+			'mtime' => array('datetime', array()),
91
+			'ctime' => array('datetime', array()),
92
+			'editor' => array('string', array('length' => 255)),
93 93
 		);
94 94
 
95
-		foreach( $columns as $name => $def )
95
+		foreach ($columns as $name => $def)
96 96
 		{
97
-			if( $table->hasColumn( $name ) === false ) {
98
-				$table->addColumn( $name, $def[0], $def[1] );
97
+			if ($table->hasColumn($name) === false) {
98
+				$table->addColumn($name, $def[0], $def[1]);
99 99
 			}
100 100
 		}
101 101
 
@@ -109,23 +109,23 @@  discard block
 block discarded – undo
109 109
 	 * @param \Doctrine\DBAL\Schema\Table $table Table object
110 110
 	 * @return \Doctrine\DBAL\Schema\Table Updated table object
111 111
 	 */
112
-	protected function addIndexes( \Doctrine\DBAL\Schema\Table $table )
112
+	protected function addIndexes(\Doctrine\DBAL\Schema\Table $table)
113 113
 	{
114 114
 		$indexes = array(
115
-			'idx_ezpus_langid' => array( 'langid' ),
116
-			'idx_ezpus_status_ln_fn' => array( 'status', 'lastname', 'firstname' ),
117
-			'idx_ezpus_status_ad1_ad2' => array( 'status', 'address1', 'address2' ),
118
-			'idx_ezpus_status_postal_city' => array( 'status', 'postal', 'city' ),
119
-			'idx_ezpus_lastname' => array( 'lastname' ),
120
-			'idx_ezpus_address1' => array( 'address1' ),
121
-			'idx_ezpus_postal' => array( 'postal' ),
122
-			'idx_ezpus_city' => array( 'city' ),
115
+			'idx_ezpus_langid' => array('langid'),
116
+			'idx_ezpus_status_ln_fn' => array('status', 'lastname', 'firstname'),
117
+			'idx_ezpus_status_ad1_ad2' => array('status', 'address1', 'address2'),
118
+			'idx_ezpus_status_postal_city' => array('status', 'postal', 'city'),
119
+			'idx_ezpus_lastname' => array('lastname'),
120
+			'idx_ezpus_address1' => array('address1'),
121
+			'idx_ezpus_postal' => array('postal'),
122
+			'idx_ezpus_city' => array('city'),
123 123
 		);
124 124
 
125
-		foreach( $indexes as $name => $def )
125
+		foreach ($indexes as $name => $def)
126 126
 		{
127
-			if( $table->hasIndex( $name ) === false ) {
128
-				$table->addIndex( $def, $name );
127
+			if ($table->hasIndex($name) === false) {
128
+				$table->addIndex($def, $name);
129 129
 			}
130 130
 		}
131 131
 
Please login to merge, or discard this patch.
Indentation   +116 added lines, -116 removed lines patch added patch discarded remove patch
@@ -14,120 +14,120 @@
 block discarded – undo
14 14
  */
15 15
 class EzuserAddAddress extends \Aimeos\MW\Setup\Task\TablesCreateMShop
16 16
 {
17
-	/**
18
-	 * Returns the list of task names which depends on this task.
19
-	 *
20
-	 * @return array List of task names
21
-	 */
22
-	public function getPreDependencies()
23
-	{
24
-		return array( 'TablesCreateEzpublish' );
25
-	}
26
-
27
-
28
-	/**
29
-	 * Migrate database schema
30
-	 */
31
-	public function migrate()
32
-	{
33
-		$this->msg( 'Adding address fields to ezuser table', 0 );
34
-
35
-		$dbal = $this->getConnection( 'db-customer' )->getRawObject();
36
-
37
-		if( !( $dbal instanceof \Doctrine\DBAL\Connection ) ) {
38
-			throw new \Aimeos\MW\Setup\Exception( 'Not a DBAL connection' );
39
-		}
40
-
41
-
42
-		$fromSchema = $dbal->getSchemaManager()->createSchema();
43
-		$toSchema = clone $fromSchema;
44
-
45
-		$this->addIndexes( $this->addColumns( $toSchema->getTable( 'ezuser' ) ) );
46
-		$sql = $fromSchema->getMigrateToSql( $toSchema, $dbal->getDatabasePlatform() );
47
-
48
-		if( $sql !== array() )
49
-		{
50
-			$this->executeList( $sql, 'db-customer' );
51
-			$this->status( 'done' );
52
-		}
53
-		else
54
-		{
55
-			$this->status( 'OK' );
56
-		}
57
-	}
58
-
59
-
60
-	/**
61
-	 * Adds the missing columns to the table
62
-	 *
63
-	 * @param \Doctrine\DBAL\Schema\Table $table Table object
64
-	 * @return \Doctrine\DBAL\Schema\Table Updated table object
65
-	 */
66
-	protected function addColumns( \Doctrine\DBAL\Schema\Table $table )
67
-	{
68
-		$columns = array(
69
-			'company' => array( 'string', array( 'length' => 100 ) ),
70
-			'vatid' => array( 'string', array( 'length' => 32 ) ),
71
-			'salutation' => array( 'string', array( 'length' => 8 ) ),
72
-			'title' => array( 'string', array( 'length' => 64 ) ),
73
-			'firstname' => array( 'string', array( 'length' => 64 ) ),
74
-			'lastname' => array( 'string', array( 'length' => 64 ) ),
75
-			'address1' => array( 'string', array( 'length' => 255 ) ),
76
-			'address2' => array( 'string', array( 'length' => 255 ) ),
77
-			'address3' => array( 'string', array( 'length' => 255 ) ),
78
-			'postal' => array( 'string', array( 'length' => 16 ) ),
79
-			'city' => array( 'string', array( 'length' => 255 ) ),
80
-			'state' => array( 'string', array( 'length' => 255 ) ),
81
-			'langid' => array( 'string', array( 'length' => 5, 'notnull' => false ) ),
82
-			'countryid' => array( 'string', array( 'length' => 2, 'notnull' => false, 'fixed' => true ) ),
83
-			'telephone' => array( 'string', array( 'length' => 32 ) ),
84
-			'telefax' => array( 'string', array( 'length' => 32 ) ),
85
-			'website' => array( 'string', array( 'length' => 255 ) ),
86
-			'birthday' => array( 'date', array( 'notnull' => false ) ),
87
-			'vdate' => array( 'date', array( 'notnull' => false ) ),
88
-			'status' => array( 'smallint', array() ),
89
-			'mtime' => array( 'datetime', array() ),
90
-			'ctime' => array( 'datetime', array() ),
91
-			'editor' => array( 'string', array( 'length' => 255 ) ),
92
-		);
93
-
94
-		foreach( $columns as $name => $def )
95
-		{
96
-			if( $table->hasColumn( $name ) === false ) {
97
-				$table->addColumn( $name, $def[0], $def[1] );
98
-			}
99
-		}
100
-
101
-		return $table;
102
-	}
103
-
104
-
105
-	/**
106
-	 * Adds the missing indexes to the table
107
-	 *
108
-	 * @param \Doctrine\DBAL\Schema\Table $table Table object
109
-	 * @return \Doctrine\DBAL\Schema\Table Updated table object
110
-	 */
111
-	protected function addIndexes( \Doctrine\DBAL\Schema\Table $table )
112
-	{
113
-		$indexes = array(
114
-			'idx_ezpus_langid' => array( 'langid' ),
115
-			'idx_ezpus_status_ln_fn' => array( 'status', 'lastname', 'firstname' ),
116
-			'idx_ezpus_status_ad1_ad2' => array( 'status', 'address1', 'address2' ),
117
-			'idx_ezpus_status_postal_city' => array( 'status', 'postal', 'city' ),
118
-			'idx_ezpus_lastname' => array( 'lastname' ),
119
-			'idx_ezpus_address1' => array( 'address1' ),
120
-			'idx_ezpus_postal' => array( 'postal' ),
121
-			'idx_ezpus_city' => array( 'city' ),
122
-		);
123
-
124
-		foreach( $indexes as $name => $def )
125
-		{
126
-			if( $table->hasIndex( $name ) === false ) {
127
-				$table->addIndex( $def, $name );
128
-			}
129
-		}
130
-
131
-		return $table;
132
-	}
17
+    /**
18
+     * Returns the list of task names which depends on this task.
19
+     *
20
+     * @return array List of task names
21
+     */
22
+    public function getPreDependencies()
23
+    {
24
+        return array( 'TablesCreateEzpublish' );
25
+    }
26
+
27
+
28
+    /**
29
+     * Migrate database schema
30
+     */
31
+    public function migrate()
32
+    {
33
+        $this->msg( 'Adding address fields to ezuser table', 0 );
34
+
35
+        $dbal = $this->getConnection( 'db-customer' )->getRawObject();
36
+
37
+        if( !( $dbal instanceof \Doctrine\DBAL\Connection ) ) {
38
+            throw new \Aimeos\MW\Setup\Exception( 'Not a DBAL connection' );
39
+        }
40
+
41
+
42
+        $fromSchema = $dbal->getSchemaManager()->createSchema();
43
+        $toSchema = clone $fromSchema;
44
+
45
+        $this->addIndexes( $this->addColumns( $toSchema->getTable( 'ezuser' ) ) );
46
+        $sql = $fromSchema->getMigrateToSql( $toSchema, $dbal->getDatabasePlatform() );
47
+
48
+        if( $sql !== array() )
49
+        {
50
+            $this->executeList( $sql, 'db-customer' );
51
+            $this->status( 'done' );
52
+        }
53
+        else
54
+        {
55
+            $this->status( 'OK' );
56
+        }
57
+    }
58
+
59
+
60
+    /**
61
+     * Adds the missing columns to the table
62
+     *
63
+     * @param \Doctrine\DBAL\Schema\Table $table Table object
64
+     * @return \Doctrine\DBAL\Schema\Table Updated table object
65
+     */
66
+    protected function addColumns( \Doctrine\DBAL\Schema\Table $table )
67
+    {
68
+        $columns = array(
69
+            'company' => array( 'string', array( 'length' => 100 ) ),
70
+            'vatid' => array( 'string', array( 'length' => 32 ) ),
71
+            'salutation' => array( 'string', array( 'length' => 8 ) ),
72
+            'title' => array( 'string', array( 'length' => 64 ) ),
73
+            'firstname' => array( 'string', array( 'length' => 64 ) ),
74
+            'lastname' => array( 'string', array( 'length' => 64 ) ),
75
+            'address1' => array( 'string', array( 'length' => 255 ) ),
76
+            'address2' => array( 'string', array( 'length' => 255 ) ),
77
+            'address3' => array( 'string', array( 'length' => 255 ) ),
78
+            'postal' => array( 'string', array( 'length' => 16 ) ),
79
+            'city' => array( 'string', array( 'length' => 255 ) ),
80
+            'state' => array( 'string', array( 'length' => 255 ) ),
81
+            'langid' => array( 'string', array( 'length' => 5, 'notnull' => false ) ),
82
+            'countryid' => array( 'string', array( 'length' => 2, 'notnull' => false, 'fixed' => true ) ),
83
+            'telephone' => array( 'string', array( 'length' => 32 ) ),
84
+            'telefax' => array( 'string', array( 'length' => 32 ) ),
85
+            'website' => array( 'string', array( 'length' => 255 ) ),
86
+            'birthday' => array( 'date', array( 'notnull' => false ) ),
87
+            'vdate' => array( 'date', array( 'notnull' => false ) ),
88
+            'status' => array( 'smallint', array() ),
89
+            'mtime' => array( 'datetime', array() ),
90
+            'ctime' => array( 'datetime', array() ),
91
+            'editor' => array( 'string', array( 'length' => 255 ) ),
92
+        );
93
+
94
+        foreach( $columns as $name => $def )
95
+        {
96
+            if( $table->hasColumn( $name ) === false ) {
97
+                $table->addColumn( $name, $def[0], $def[1] );
98
+            }
99
+        }
100
+
101
+        return $table;
102
+    }
103
+
104
+
105
+    /**
106
+     * Adds the missing indexes to the table
107
+     *
108
+     * @param \Doctrine\DBAL\Schema\Table $table Table object
109
+     * @return \Doctrine\DBAL\Schema\Table Updated table object
110
+     */
111
+    protected function addIndexes( \Doctrine\DBAL\Schema\Table $table )
112
+    {
113
+        $indexes = array(
114
+            'idx_ezpus_langid' => array( 'langid' ),
115
+            'idx_ezpus_status_ln_fn' => array( 'status', 'lastname', 'firstname' ),
116
+            'idx_ezpus_status_ad1_ad2' => array( 'status', 'address1', 'address2' ),
117
+            'idx_ezpus_status_postal_city' => array( 'status', 'postal', 'city' ),
118
+            'idx_ezpus_lastname' => array( 'lastname' ),
119
+            'idx_ezpus_address1' => array( 'address1' ),
120
+            'idx_ezpus_postal' => array( 'postal' ),
121
+            'idx_ezpus_city' => array( 'city' ),
122
+        );
123
+
124
+        foreach( $indexes as $name => $def )
125
+        {
126
+            if( $table->hasIndex( $name ) === false ) {
127
+                $table->addIndex( $def, $name );
128
+            }
129
+        }
130
+
131
+        return $table;
132
+    }
133 133
 }
Please login to merge, or discard this patch.
lib/custom/setup/TablesCreateEzpublish.php 2 patches
Indentation   +27 added lines, -27 removed lines patch added patch discarded remove patch
@@ -14,31 +14,31 @@
 block discarded – undo
14 14
  */
15 15
 class TablesCreateEzpublish extends \Aimeos\MW\Setup\Task\TablesCreateMShop
16 16
 {
17
-	/**
18
-	 * Returns the list of task names which depends on this task.
19
-	 *
20
-	 * @return array List of task names
21
-	 */
22
-	public function getPostDependencies()
23
-	{
24
-		return array( 'MShopAddTypeData' );
25
-	}
26
-
27
-
28
-	/**
29
-	 * Migrate database schema
30
-	 */
31
-	public function migrate()
32
-	{
33
-		$this->msg( 'Creating Aimeos ezPublish tables', 0 );
34
-		$this->status( '' );
35
-
36
-		$ds = DIRECTORY_SEPARATOR;
37
-
38
-		$files = array(
39
-			'db-customer' => __DIR__ . $ds . 'default' . $ds . 'schema' . $ds . 'customer.php',
40
-		);
41
-
42
-		$this->setupSchema( $files );
43
-	}
17
+    /**
18
+     * Returns the list of task names which depends on this task.
19
+     *
20
+     * @return array List of task names
21
+     */
22
+    public function getPostDependencies()
23
+    {
24
+        return array( 'MShopAddTypeData' );
25
+    }
26
+
27
+
28
+    /**
29
+     * Migrate database schema
30
+     */
31
+    public function migrate()
32
+    {
33
+        $this->msg( 'Creating Aimeos ezPublish tables', 0 );
34
+        $this->status( '' );
35
+
36
+        $ds = DIRECTORY_SEPARATOR;
37
+
38
+        $files = array(
39
+            'db-customer' => __DIR__ . $ds . 'default' . $ds . 'schema' . $ds . 'customer.php',
40
+        );
41
+
42
+        $this->setupSchema( $files );
43
+    }
44 44
 }
Please login to merge, or discard this patch.
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -21,7 +21,7 @@  discard block
 block discarded – undo
21 21
 	 */
22 22
 	public function getPostDependencies()
23 23
 	{
24
-		return array( 'MShopAddTypeData' );
24
+		return array('MShopAddTypeData');
25 25
 	}
26 26
 
27 27
 
@@ -30,15 +30,15 @@  discard block
 block discarded – undo
30 30
 	 */
31 31
 	public function migrate()
32 32
 	{
33
-		$this->msg( 'Creating Aimeos ezPublish tables', 0 );
34
-		$this->status( '' );
33
+		$this->msg('Creating Aimeos ezPublish tables', 0);
34
+		$this->status('');
35 35
 
36 36
 		$ds = DIRECTORY_SEPARATOR;
37 37
 
38 38
 		$files = array(
39
-			'db-customer' => __DIR__ . $ds . 'default' . $ds . 'schema' . $ds . 'customer.php',
39
+			'db-customer' => __DIR__.$ds.'default'.$ds.'schema'.$ds.'customer.php',
40 40
 		);
41 41
 
42
-		$this->setupSchema( $files );
42
+		$this->setupSchema($files);
43 43
 	}
44 44
 }
Please login to merge, or discard this patch.
lib/custom/setup/unittest/CustomerListAddEzpublishTestData.php 2 patches
Indentation   +43 added lines, -43 removed lines patch added patch discarded remove patch
@@ -13,48 +13,48 @@
 block discarded – undo
13 13
  * Adds customer list test data.
14 14
  */
15 15
 class CustomerListAddEzpublishTestData
16
-	extends \Aimeos\MW\Setup\Task\CustomerListAddTestData
16
+    extends \Aimeos\MW\Setup\Task\CustomerListAddTestData
17 17
 {
18
-	/**
19
-	 * Returns the list of task names which this task depends on.
20
-	 *
21
-	 * @return string[] List of task names
22
-	 */
23
-	public function getPreDependencies()
24
-	{
25
-		return array( 'TablesCreateEzpublish', 'CustomerAddEzpublishTestData', 'LocaleAddTestData', 'TextAddTestData' );
26
-	}
27
-
28
-
29
-	/**
30
-	 * Adds attribute test data.
31
-	 */
32
-	public function migrate()
33
-	{
34
-		$iface = '\\Aimeos\\MShop\\Context\\Item\\Iface';
35
-		if( !( $this->additional instanceof $iface ) ) {
36
-			throw new \Aimeos\MW\Setup\Exception( sprintf( 'Additionally provided object is not of type "%1$s"', $iface ) );
37
-		}
38
-
39
-		$this->msg( 'Adding customer-list ezPublish test data', 0 );
40
-		$this->additional->setEditor( 'ai-ezpublish:unittest' );
41
-
42
-		$ds = DIRECTORY_SEPARATOR;
43
-		$path = dirname( __FILE__ ) . $ds . 'data' . $ds . 'customer-list.php';
44
-
45
-		if( ( $testdata = include( $path ) ) === false ){
46
-			throw new \Aimeos\MShop\Exception( sprintf( 'No file "%1$s" found for customer list domain', $path ) );
47
-		}
48
-
49
-		$refKeys = array();
50
-		foreach( $testdata['customer/lists'] as $dataset ) {
51
-			$refKeys[ $dataset['domain'] ][] = $dataset['refid'];
52
-		}
53
-
54
-		$refIds = array();
55
-		$refIds['text'] = $this->getTextData( $refKeys['text'] );
56
-		$this->addCustomerListData( $testdata, $refIds, 'Ezpublish' );
57
-
58
-		$this->status( 'done' );
59
-	}
18
+    /**
19
+     * Returns the list of task names which this task depends on.
20
+     *
21
+     * @return string[] List of task names
22
+     */
23
+    public function getPreDependencies()
24
+    {
25
+        return array( 'TablesCreateEzpublish', 'CustomerAddEzpublishTestData', 'LocaleAddTestData', 'TextAddTestData' );
26
+    }
27
+
28
+
29
+    /**
30
+     * Adds attribute test data.
31
+     */
32
+    public function migrate()
33
+    {
34
+        $iface = '\\Aimeos\\MShop\\Context\\Item\\Iface';
35
+        if( !( $this->additional instanceof $iface ) ) {
36
+            throw new \Aimeos\MW\Setup\Exception( sprintf( 'Additionally provided object is not of type "%1$s"', $iface ) );
37
+        }
38
+
39
+        $this->msg( 'Adding customer-list ezPublish test data', 0 );
40
+        $this->additional->setEditor( 'ai-ezpublish:unittest' );
41
+
42
+        $ds = DIRECTORY_SEPARATOR;
43
+        $path = dirname( __FILE__ ) . $ds . 'data' . $ds . 'customer-list.php';
44
+
45
+        if( ( $testdata = include( $path ) ) === false ){
46
+            throw new \Aimeos\MShop\Exception( sprintf( 'No file "%1$s" found for customer list domain', $path ) );
47
+        }
48
+
49
+        $refKeys = array();
50
+        foreach( $testdata['customer/lists'] as $dataset ) {
51
+            $refKeys[ $dataset['domain'] ][] = $dataset['refid'];
52
+        }
53
+
54
+        $refIds = array();
55
+        $refIds['text'] = $this->getTextData( $refKeys['text'] );
56
+        $this->addCustomerListData( $testdata, $refIds, 'Ezpublish' );
57
+
58
+        $this->status( 'done' );
59
+    }
60 60
 }
Please login to merge, or discard this patch.
Spacing   +13 added lines, -13 removed lines patch added patch discarded remove patch
@@ -22,7 +22,7 @@  discard block
 block discarded – undo
22 22
 	 */
23 23
 	public function getPreDependencies()
24 24
 	{
25
-		return array( 'TablesCreateEzpublish', 'CustomerAddEzpublishTestData', 'LocaleAddTestData', 'TextAddTestData' );
25
+		return array('TablesCreateEzpublish', 'CustomerAddEzpublishTestData', 'LocaleAddTestData', 'TextAddTestData');
26 26
 	}
27 27
 
28 28
 
@@ -32,29 +32,29 @@  discard block
 block discarded – undo
32 32
 	public function migrate()
33 33
 	{
34 34
 		$iface = '\\Aimeos\\MShop\\Context\\Item\\Iface';
35
-		if( !( $this->additional instanceof $iface ) ) {
36
-			throw new \Aimeos\MW\Setup\Exception( sprintf( 'Additionally provided object is not of type "%1$s"', $iface ) );
35
+		if (!($this->additional instanceof $iface)) {
36
+			throw new \Aimeos\MW\Setup\Exception(sprintf('Additionally provided object is not of type "%1$s"', $iface));
37 37
 		}
38 38
 
39
-		$this->msg( 'Adding customer-list ezPublish test data', 0 );
40
-		$this->additional->setEditor( 'ai-ezpublish:unittest' );
39
+		$this->msg('Adding customer-list ezPublish test data', 0);
40
+		$this->additional->setEditor('ai-ezpublish:unittest');
41 41
 
42 42
 		$ds = DIRECTORY_SEPARATOR;
43
-		$path = dirname( __FILE__ ) . $ds . 'data' . $ds . 'customer-list.php';
43
+		$path = dirname(__FILE__).$ds.'data'.$ds.'customer-list.php';
44 44
 
45
-		if( ( $testdata = include( $path ) ) === false ){
46
-			throw new \Aimeos\MShop\Exception( sprintf( 'No file "%1$s" found for customer list domain', $path ) );
45
+		if (($testdata = include($path)) === false) {
46
+			throw new \Aimeos\MShop\Exception(sprintf('No file "%1$s" found for customer list domain', $path));
47 47
 		}
48 48
 
49 49
 		$refKeys = array();
50
-		foreach( $testdata['customer/lists'] as $dataset ) {
51
-			$refKeys[ $dataset['domain'] ][] = $dataset['refid'];
50
+		foreach ($testdata['customer/lists'] as $dataset) {
51
+			$refKeys[$dataset['domain']][] = $dataset['refid'];
52 52
 		}
53 53
 
54 54
 		$refIds = array();
55
-		$refIds['text'] = $this->getTextData( $refKeys['text'] );
56
-		$this->addCustomerListData( $testdata, $refIds, 'Ezpublish' );
55
+		$refIds['text'] = $this->getTextData($refKeys['text']);
56
+		$this->addCustomerListData($testdata, $refIds, 'Ezpublish');
57 57
 
58
-		$this->status( 'done' );
58
+		$this->status('done');
59 59
 	}
60 60
 }
Please login to merge, or discard this patch.
lib/custom/setup/unittest/data/customer.php 2 patches
Indentation   +11 added lines, -11 removed lines patch added patch discarded remove patch
@@ -6,15 +6,15 @@
 block discarded – undo
6 6
  */
7 7
 
8 8
 return array (
9
-	'customer' => array(
10
-		'customer/UTC001' => array( 'code' => 'UTC001', 'label' => 'unitCustomer1', 'salutation' => 'mr', 'company' => 'ABC GmbH', 'vatid' => 'DE999999999', 'title' => 'Dr.', 'firstname' => 'Max', 'lastname' => 'Mustermann', 'address1' => 'Musterstraße', 'address2' => '1a', 'address3' => '', 'postal' => '20001', 'city' => 'Musterstadt', 'state' => 'Hamburg', 'langid' => 'de', 'countryid' => 'DE', 'telephone' => '01234567890', 'email' => '[email protected]', 'telefax' => '01234567890', 'website' => 'unittest.aimeos.org', 'birthday' => '1970-01-01', 'status' => '1', 'password' => 'test' ),
11
-		'customer/UTC002' => array( 'code' => 'UTC002', 'label' => 'unitCustomer2', 'salutation' => 'mrs', 'company' => 'ABC GmbH', 'vatid' => 'DE999999999', 'title' => 'Prof. Dr.', 'firstname' => 'Erika', 'lastname' => 'Mustermann', 'address1' => 'Heidestraße', 'address2' => '17', 'address3' => '', 'postal' => '45632', 'city' => 'Köln', 'state' => '', 'langid' => 'de', 'countryid' => 'DE', 'telephone' => '09876543210', 'email' => '[email protected]', 'telefax' => '09876543210', 'website' => 'unittest.aimeos.org', 'birthday' => '1970-01-01', 'status' => '0','password' =>  'test' ),
12
-		'customer/UTC003' => array( 'code' => 'UTC003', 'label' => 'unitCustomer3', 'salutation' => 'mr', 'company' => 'ABC GmbH', 'vatid' => 'DE999999999', 'title' => '', 'firstname' => 'Franz-Xaver', 'lastname' => 'Gabler', 'address1' => 'Phantasiestraße', 'address2' => '2', 'address3' => '', 'postal' => '23643', 'city' => 'Berlin', 'state' => 'Berlin', 'langid' => 'de', 'countryid' => 'DE', 'telephone' => '01234509876', 'email' => '[email protected]', 'telefax' => '055544333212', 'website' => 'unittest.aimeos.org', 'birthday' => '1970-01-01', 'status' => '1', 'password' => 'test' ),
13
-	),
14
-	'customer/address' => array(
15
-		array ( 'parentid' => 'customer/UTC001', 'company' => 'ABC', 'vatid' => 'DE999999999', 'salutation' => 'mr', 'title' => 'Dr', 'firstname' => 'Our', 'lastname' => 'Unittest', 'address1' => 'Pickhuben', 'address2' => '2-4', 'address3' => '', 'postal' => '20457', 'city' => 'Hamburg', 'state' => 'Hamburg', 'countryid' => 'DE', 'langid' => 'de', 'telephone' => '055544332211', 'email' => '[email protected]', 'telefax' => '055544332212', 'website' => 'unittest.aimeos.org', 'flag' => 0, 'pos' => '0' ),
16
-		array ( 'parentid' => 'customer/UTC002', 'company' => 'ABC GmbH', 'vatid' => 'DE999999999', 'salutation' => 'mr', 'title' => 'Dr.', 'firstname' => 'Good', 'lastname' => 'Unittest', 'address1' => 'Pickhuben', 'address2' => '2-4', 'address3' => '', 'postal' => '20457', 'city' => 'Hamburg', 'state' => 'Hamburg', 'countryid' => 'DE', 'langid' => 'de', 'telephone' => '055544332211', 'email' => '[email protected]', 'telefax' => '055544332212', 'website' => 'unittest.aimeos.org', 'flag' => 0, 'pos' => '1' ),
17
-		array ( 'parentid' => 'customer/UTC002', 'company' => 'ABC GmbH', 'vatid' => 'DE999999999', 'salutation' => 'mr', 'title' => 'Dr.', 'firstname' => 'Good', 'lastname' => 'Unittest', 'address1' => 'Pickhuben', 'address2' => '2-4', 'address3' => '', 'postal' => '11099', 'city' => 'Berlin', 'state' => 'Berlin', 'countryid' => 'DE', 'langid' => 'de', 'telephone' => '055544332221', 'email' => '[email protected]', 'telefax' => '055544333212', 'website' => 'unittest.aimeos.org', 'flag' => 0, 'pos' => '1' ),
18
-		array ( 'parentid' => 'customer/UTC003', 'company' => 'unitcompany', 'vatid' => 'DE999999999', 'salutation' => 'company', 'title' => 'unittitle', 'firstname' => 'unitfirstname', 'lastname' => 'unitlastname', 'address1' => 'unitaddress1', 'address2' => 'unitaddress2', 'address3' => 'unitaddress3', 'postal' => 'unitpostal', 'city' => 'unitcity', 'state' => 'unitstate', 'countryid' => 'DE', 'langid' => 'de', 'telephone' => '1234567890', 'email' => '[email protected]', 'telefax' => '1234567891', 'website' => 'unittest.aimeos.org', 'flag' => 0, 'pos' => '2' ),
19
-	),
9
+    'customer' => array(
10
+        'customer/UTC001' => array( 'code' => 'UTC001', 'label' => 'unitCustomer1', 'salutation' => 'mr', 'company' => 'ABC GmbH', 'vatid' => 'DE999999999', 'title' => 'Dr.', 'firstname' => 'Max', 'lastname' => 'Mustermann', 'address1' => 'Musterstraße', 'address2' => '1a', 'address3' => '', 'postal' => '20001', 'city' => 'Musterstadt', 'state' => 'Hamburg', 'langid' => 'de', 'countryid' => 'DE', 'telephone' => '01234567890', 'email' => '[email protected]', 'telefax' => '01234567890', 'website' => 'unittest.aimeos.org', 'birthday' => '1970-01-01', 'status' => '1', 'password' => 'test' ),
11
+        'customer/UTC002' => array( 'code' => 'UTC002', 'label' => 'unitCustomer2', 'salutation' => 'mrs', 'company' => 'ABC GmbH', 'vatid' => 'DE999999999', 'title' => 'Prof. Dr.', 'firstname' => 'Erika', 'lastname' => 'Mustermann', 'address1' => 'Heidestraße', 'address2' => '17', 'address3' => '', 'postal' => '45632', 'city' => 'Köln', 'state' => '', 'langid' => 'de', 'countryid' => 'DE', 'telephone' => '09876543210', 'email' => '[email protected]', 'telefax' => '09876543210', 'website' => 'unittest.aimeos.org', 'birthday' => '1970-01-01', 'status' => '0','password' =>  'test' ),
12
+        'customer/UTC003' => array( 'code' => 'UTC003', 'label' => 'unitCustomer3', 'salutation' => 'mr', 'company' => 'ABC GmbH', 'vatid' => 'DE999999999', 'title' => '', 'firstname' => 'Franz-Xaver', 'lastname' => 'Gabler', 'address1' => 'Phantasiestraße', 'address2' => '2', 'address3' => '', 'postal' => '23643', 'city' => 'Berlin', 'state' => 'Berlin', 'langid' => 'de', 'countryid' => 'DE', 'telephone' => '01234509876', 'email' => '[email protected]', 'telefax' => '055544333212', 'website' => 'unittest.aimeos.org', 'birthday' => '1970-01-01', 'status' => '1', 'password' => 'test' ),
13
+    ),
14
+    'customer/address' => array(
15
+        array ( 'parentid' => 'customer/UTC001', 'company' => 'ABC', 'vatid' => 'DE999999999', 'salutation' => 'mr', 'title' => 'Dr', 'firstname' => 'Our', 'lastname' => 'Unittest', 'address1' => 'Pickhuben', 'address2' => '2-4', 'address3' => '', 'postal' => '20457', 'city' => 'Hamburg', 'state' => 'Hamburg', 'countryid' => 'DE', 'langid' => 'de', 'telephone' => '055544332211', 'email' => '[email protected]', 'telefax' => '055544332212', 'website' => 'unittest.aimeos.org', 'flag' => 0, 'pos' => '0' ),
16
+        array ( 'parentid' => 'customer/UTC002', 'company' => 'ABC GmbH', 'vatid' => 'DE999999999', 'salutation' => 'mr', 'title' => 'Dr.', 'firstname' => 'Good', 'lastname' => 'Unittest', 'address1' => 'Pickhuben', 'address2' => '2-4', 'address3' => '', 'postal' => '20457', 'city' => 'Hamburg', 'state' => 'Hamburg', 'countryid' => 'DE', 'langid' => 'de', 'telephone' => '055544332211', 'email' => '[email protected]', 'telefax' => '055544332212', 'website' => 'unittest.aimeos.org', 'flag' => 0, 'pos' => '1' ),
17
+        array ( 'parentid' => 'customer/UTC002', 'company' => 'ABC GmbH', 'vatid' => 'DE999999999', 'salutation' => 'mr', 'title' => 'Dr.', 'firstname' => 'Good', 'lastname' => 'Unittest', 'address1' => 'Pickhuben', 'address2' => '2-4', 'address3' => '', 'postal' => '11099', 'city' => 'Berlin', 'state' => 'Berlin', 'countryid' => 'DE', 'langid' => 'de', 'telephone' => '055544332221', 'email' => '[email protected]', 'telefax' => '055544333212', 'website' => 'unittest.aimeos.org', 'flag' => 0, 'pos' => '1' ),
18
+        array ( 'parentid' => 'customer/UTC003', 'company' => 'unitcompany', 'vatid' => 'DE999999999', 'salutation' => 'company', 'title' => 'unittitle', 'firstname' => 'unitfirstname', 'lastname' => 'unitlastname', 'address1' => 'unitaddress1', 'address2' => 'unitaddress2', 'address3' => 'unitaddress3', 'postal' => 'unitpostal', 'city' => 'unitcity', 'state' => 'unitstate', 'countryid' => 'DE', 'langid' => 'de', 'telephone' => '1234567890', 'email' => '[email protected]', 'telefax' => '1234567891', 'website' => 'unittest.aimeos.org', 'flag' => 0, 'pos' => '2' ),
19
+    ),
20 20
 );
Please login to merge, or discard this patch.
Spacing   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -5,16 +5,16 @@
 block discarded – undo
5 5
  * @copyright Aimeos (aimeos.org), 2016
6 6
  */
7 7
 
8
-return array (
8
+return array(
9 9
 	'customer' => array(
10
-		'customer/UTC001' => array( 'code' => 'UTC001', 'label' => 'unitCustomer1', 'salutation' => 'mr', 'company' => 'ABC GmbH', 'vatid' => 'DE999999999', 'title' => 'Dr.', 'firstname' => 'Max', 'lastname' => 'Mustermann', 'address1' => 'Musterstraße', 'address2' => '1a', 'address3' => '', 'postal' => '20001', 'city' => 'Musterstadt', 'state' => 'Hamburg', 'langid' => 'de', 'countryid' => 'DE', 'telephone' => '01234567890', 'email' => '[email protected]', 'telefax' => '01234567890', 'website' => 'unittest.aimeos.org', 'birthday' => '1970-01-01', 'status' => '1', 'password' => 'test' ),
11
-		'customer/UTC002' => array( 'code' => 'UTC002', 'label' => 'unitCustomer2', 'salutation' => 'mrs', 'company' => 'ABC GmbH', 'vatid' => 'DE999999999', 'title' => 'Prof. Dr.', 'firstname' => 'Erika', 'lastname' => 'Mustermann', 'address1' => 'Heidestraße', 'address2' => '17', 'address3' => '', 'postal' => '45632', 'city' => 'Köln', 'state' => '', 'langid' => 'de', 'countryid' => 'DE', 'telephone' => '09876543210', 'email' => '[email protected]', 'telefax' => '09876543210', 'website' => 'unittest.aimeos.org', 'birthday' => '1970-01-01', 'status' => '0','password' =>  'test' ),
12
-		'customer/UTC003' => array( 'code' => 'UTC003', 'label' => 'unitCustomer3', 'salutation' => 'mr', 'company' => 'ABC GmbH', 'vatid' => 'DE999999999', 'title' => '', 'firstname' => 'Franz-Xaver', 'lastname' => 'Gabler', 'address1' => 'Phantasiestraße', 'address2' => '2', 'address3' => '', 'postal' => '23643', 'city' => 'Berlin', 'state' => 'Berlin', 'langid' => 'de', 'countryid' => 'DE', 'telephone' => '01234509876', 'email' => '[email protected]', 'telefax' => '055544333212', 'website' => 'unittest.aimeos.org', 'birthday' => '1970-01-01', 'status' => '1', 'password' => 'test' ),
10
+		'customer/UTC001' => array('code' => 'UTC001', 'label' => 'unitCustomer1', 'salutation' => 'mr', 'company' => 'ABC GmbH', 'vatid' => 'DE999999999', 'title' => 'Dr.', 'firstname' => 'Max', 'lastname' => 'Mustermann', 'address1' => 'Musterstraße', 'address2' => '1a', 'address3' => '', 'postal' => '20001', 'city' => 'Musterstadt', 'state' => 'Hamburg', 'langid' => 'de', 'countryid' => 'DE', 'telephone' => '01234567890', 'email' => '[email protected]', 'telefax' => '01234567890', 'website' => 'unittest.aimeos.org', 'birthday' => '1970-01-01', 'status' => '1', 'password' => 'test'),
11
+		'customer/UTC002' => array('code' => 'UTC002', 'label' => 'unitCustomer2', 'salutation' => 'mrs', 'company' => 'ABC GmbH', 'vatid' => 'DE999999999', 'title' => 'Prof. Dr.', 'firstname' => 'Erika', 'lastname' => 'Mustermann', 'address1' => 'Heidestraße', 'address2' => '17', 'address3' => '', 'postal' => '45632', 'city' => 'Köln', 'state' => '', 'langid' => 'de', 'countryid' => 'DE', 'telephone' => '09876543210', 'email' => '[email protected]', 'telefax' => '09876543210', 'website' => 'unittest.aimeos.org', 'birthday' => '1970-01-01', 'status' => '0', 'password' =>  'test'),
12
+		'customer/UTC003' => array('code' => 'UTC003', 'label' => 'unitCustomer3', 'salutation' => 'mr', 'company' => 'ABC GmbH', 'vatid' => 'DE999999999', 'title' => '', 'firstname' => 'Franz-Xaver', 'lastname' => 'Gabler', 'address1' => 'Phantasiestraße', 'address2' => '2', 'address3' => '', 'postal' => '23643', 'city' => 'Berlin', 'state' => 'Berlin', 'langid' => 'de', 'countryid' => 'DE', 'telephone' => '01234509876', 'email' => '[email protected]', 'telefax' => '055544333212', 'website' => 'unittest.aimeos.org', 'birthday' => '1970-01-01', 'status' => '1', 'password' => 'test'),
13 13
 	),
14 14
 	'customer/address' => array(
15
-		array ( 'parentid' => 'customer/UTC001', 'company' => 'ABC', 'vatid' => 'DE999999999', 'salutation' => 'mr', 'title' => 'Dr', 'firstname' => 'Our', 'lastname' => 'Unittest', 'address1' => 'Pickhuben', 'address2' => '2-4', 'address3' => '', 'postal' => '20457', 'city' => 'Hamburg', 'state' => 'Hamburg', 'countryid' => 'DE', 'langid' => 'de', 'telephone' => '055544332211', 'email' => '[email protected]', 'telefax' => '055544332212', 'website' => 'unittest.aimeos.org', 'flag' => 0, 'pos' => '0' ),
16
-		array ( 'parentid' => 'customer/UTC002', 'company' => 'ABC GmbH', 'vatid' => 'DE999999999', 'salutation' => 'mr', 'title' => 'Dr.', 'firstname' => 'Good', 'lastname' => 'Unittest', 'address1' => 'Pickhuben', 'address2' => '2-4', 'address3' => '', 'postal' => '20457', 'city' => 'Hamburg', 'state' => 'Hamburg', 'countryid' => 'DE', 'langid' => 'de', 'telephone' => '055544332211', 'email' => '[email protected]', 'telefax' => '055544332212', 'website' => 'unittest.aimeos.org', 'flag' => 0, 'pos' => '1' ),
17
-		array ( 'parentid' => 'customer/UTC002', 'company' => 'ABC GmbH', 'vatid' => 'DE999999999', 'salutation' => 'mr', 'title' => 'Dr.', 'firstname' => 'Good', 'lastname' => 'Unittest', 'address1' => 'Pickhuben', 'address2' => '2-4', 'address3' => '', 'postal' => '11099', 'city' => 'Berlin', 'state' => 'Berlin', 'countryid' => 'DE', 'langid' => 'de', 'telephone' => '055544332221', 'email' => '[email protected]', 'telefax' => '055544333212', 'website' => 'unittest.aimeos.org', 'flag' => 0, 'pos' => '1' ),
18
-		array ( 'parentid' => 'customer/UTC003', 'company' => 'unitcompany', 'vatid' => 'DE999999999', 'salutation' => 'company', 'title' => 'unittitle', 'firstname' => 'unitfirstname', 'lastname' => 'unitlastname', 'address1' => 'unitaddress1', 'address2' => 'unitaddress2', 'address3' => 'unitaddress3', 'postal' => 'unitpostal', 'city' => 'unitcity', 'state' => 'unitstate', 'countryid' => 'DE', 'langid' => 'de', 'telephone' => '1234567890', 'email' => '[email protected]', 'telefax' => '1234567891', 'website' => 'unittest.aimeos.org', 'flag' => 0, 'pos' => '2' ),
15
+		array('parentid' => 'customer/UTC001', 'company' => 'ABC', 'vatid' => 'DE999999999', 'salutation' => 'mr', 'title' => 'Dr', 'firstname' => 'Our', 'lastname' => 'Unittest', 'address1' => 'Pickhuben', 'address2' => '2-4', 'address3' => '', 'postal' => '20457', 'city' => 'Hamburg', 'state' => 'Hamburg', 'countryid' => 'DE', 'langid' => 'de', 'telephone' => '055544332211', 'email' => '[email protected]', 'telefax' => '055544332212', 'website' => 'unittest.aimeos.org', 'flag' => 0, 'pos' => '0'),
16
+		array('parentid' => 'customer/UTC002', 'company' => 'ABC GmbH', 'vatid' => 'DE999999999', 'salutation' => 'mr', 'title' => 'Dr.', 'firstname' => 'Good', 'lastname' => 'Unittest', 'address1' => 'Pickhuben', 'address2' => '2-4', 'address3' => '', 'postal' => '20457', 'city' => 'Hamburg', 'state' => 'Hamburg', 'countryid' => 'DE', 'langid' => 'de', 'telephone' => '055544332211', 'email' => '[email protected]', 'telefax' => '055544332212', 'website' => 'unittest.aimeos.org', 'flag' => 0, 'pos' => '1'),
17
+		array('parentid' => 'customer/UTC002', 'company' => 'ABC GmbH', 'vatid' => 'DE999999999', 'salutation' => 'mr', 'title' => 'Dr.', 'firstname' => 'Good', 'lastname' => 'Unittest', 'address1' => 'Pickhuben', 'address2' => '2-4', 'address3' => '', 'postal' => '11099', 'city' => 'Berlin', 'state' => 'Berlin', 'countryid' => 'DE', 'langid' => 'de', 'telephone' => '055544332221', 'email' => '[email protected]', 'telefax' => '055544333212', 'website' => 'unittest.aimeos.org', 'flag' => 0, 'pos' => '1'),
18
+		array('parentid' => 'customer/UTC003', 'company' => 'unitcompany', 'vatid' => 'DE999999999', 'salutation' => 'company', 'title' => 'unittitle', 'firstname' => 'unitfirstname', 'lastname' => 'unitlastname', 'address1' => 'unitaddress1', 'address2' => 'unitaddress2', 'address3' => 'unitaddress3', 'postal' => 'unitpostal', 'city' => 'unitcity', 'state' => 'unitstate', 'countryid' => 'DE', 'langid' => 'de', 'telephone' => '1234567890', 'email' => '[email protected]', 'telefax' => '1234567891', 'website' => 'unittest.aimeos.org', 'flag' => 0, 'pos' => '2'),
19 19
 	),
20 20
 );
Please login to merge, or discard this patch.