1
|
|
|
<?php |
2
|
|
|
|
3
|
|
|
/** |
4
|
|
|
* @file |
5
|
|
|
* Magento API Client (SOAP v1). |
6
|
|
|
* Allows wrappers for each call, dependencies injections |
7
|
|
|
* and code completion. |
8
|
|
|
* |
9
|
|
|
* @author Sébastien MALOT <[email protected]> |
10
|
|
|
* @license MIT |
11
|
|
|
* @url <https://github.com/smalot/magento-client> |
12
|
|
|
* |
13
|
|
|
* For the full copyright and license information, please view the LICENSE |
14
|
|
|
* file that was distributed with this source code. |
15
|
|
|
*/ |
16
|
|
|
|
17
|
|
|
namespace Smalot\Magento\Catalog; |
18
|
|
|
|
19
|
|
|
use Smalot\Magento\ActionInterface; |
20
|
|
|
use Smalot\Magento\MagentoModuleAbstract; |
21
|
|
|
|
22
|
|
|
/** |
23
|
|
|
* Class ProductAttributeSet |
24
|
|
|
* |
25
|
|
|
* @package Smalot\Magento\Catalog |
26
|
|
|
*/ |
27
|
|
|
class ProductAttributeSet extends MagentoModuleAbstract |
28
|
|
|
{ |
29
|
|
|
/** |
30
|
|
|
* Allows you to add an existing attribute to an attribute set. |
31
|
|
|
* |
32
|
|
|
* @param string $attributeId |
33
|
|
|
* @param string $attributeSetId |
34
|
|
|
* @param string $attributeGroupId |
35
|
|
|
* @param string $sortOrder |
36
|
|
|
* |
37
|
|
|
* @return ActionInterface |
38
|
|
|
*/ |
39
|
|
|
public function attributeAdd($attributeId, $attributeSetId, $attributeGroupId = null, $sortOrder = null) |
|
|
|
|
40
|
|
|
{ |
41
|
|
|
return $this->__createAction('product_attribute_set.attributeAdd', func_get_args()); |
42
|
|
|
} |
43
|
|
|
|
44
|
|
|
/** |
45
|
|
|
* Allows you to remove an existing attribute from an attribute set. |
46
|
|
|
* |
47
|
|
|
* @param string $attributeId |
48
|
|
|
* @param string $attributeSetId |
49
|
|
|
* |
50
|
|
|
* @return ActionInterface |
51
|
|
|
*/ |
52
|
|
|
public function attributeRemove($attributeId, $attributeSetId) |
|
|
|
|
53
|
|
|
{ |
54
|
|
|
return $this->__createAction('product_attribute_set.attributeRemove', func_get_args()); |
55
|
|
|
} |
56
|
|
|
|
57
|
|
|
/** |
58
|
|
|
* Allows you to create a new attribute set based on another attribute set. |
59
|
|
|
* |
60
|
|
|
* @param string $attributeSetName |
61
|
|
|
* @param string $skeletonSetId |
62
|
|
|
* |
63
|
|
|
* @return ActionInterface |
64
|
|
|
*/ |
65
|
|
|
public function create($attributeSetName, $skeletonSetId) |
|
|
|
|
66
|
|
|
{ |
67
|
|
|
return $this->__createAction('product_attribute_set.create', func_get_args()); |
68
|
|
|
} |
69
|
|
|
|
70
|
|
|
/** |
71
|
|
|
* Allows you to add a new group for attributes to the attribute set. |
72
|
|
|
* |
73
|
|
|
* @param string $attributeSetId |
74
|
|
|
* @param string $groupName |
75
|
|
|
* |
76
|
|
|
* @return ActionInterface |
77
|
|
|
*/ |
78
|
|
|
public function groupAdd($attributeSetId, $groupName) |
|
|
|
|
79
|
|
|
{ |
80
|
|
|
return $this->__createAction('product_attribute_set.groupAdd', func_get_args()); |
81
|
|
|
} |
82
|
|
|
|
83
|
|
|
/** |
84
|
|
|
* Allows you to remove a group from an attribute set. |
85
|
|
|
* |
86
|
|
|
* @param string $attributeGroupId |
87
|
|
|
* |
88
|
|
|
* @return ActionInterface |
89
|
|
|
*/ |
90
|
|
|
public function groupRemove($attributeGroupId) |
|
|
|
|
91
|
|
|
{ |
92
|
|
|
return $this->__createAction('product_attribute_set.groupRemove', func_get_args()); |
93
|
|
|
} |
94
|
|
|
|
95
|
|
|
/** |
96
|
|
|
* Allows you to rename a group in the attribute set. |
97
|
|
|
* |
98
|
|
|
* @param string $groupId |
99
|
|
|
* @param string $groupName |
100
|
|
|
* |
101
|
|
|
* @return ActionInterface |
102
|
|
|
*/ |
103
|
|
|
public function groupRename($groupId, $groupName) |
|
|
|
|
104
|
|
|
{ |
105
|
|
|
return $this->__createAction('product_attribute_set.groupRename', func_get_args()); |
106
|
|
|
} |
107
|
|
|
|
108
|
|
|
/** |
109
|
|
|
* Allows you to retrieve the list of product attribute sets. |
110
|
|
|
* |
111
|
|
|
* @return ActionInterface |
112
|
|
|
*/ |
113
|
|
|
public function getList() |
114
|
|
|
{ |
115
|
|
|
return $this->__createAction('product_attribute_set.list', func_get_args()); |
116
|
|
|
} |
117
|
|
|
|
118
|
|
|
/** |
119
|
|
|
* Allows you to remove an existing attribute set. |
120
|
|
|
* |
121
|
|
|
* @param string $attributeSetId |
122
|
|
|
* @param string $forceProductsRemove |
123
|
|
|
* |
124
|
|
|
* @return ActionInterface |
125
|
|
|
*/ |
126
|
|
|
public function remove($attributeSetId, $forceProductsRemove) |
|
|
|
|
127
|
|
|
{ |
128
|
|
|
return $this->__createAction('product_attribute_set.remove', func_get_args()); |
129
|
|
|
} |
130
|
|
|
} |
131
|
|
|
|
This check looks from parameters that have been defined for a function or method, but which are not used in the method body.