1 | <?php |
||
32 | trait MediaSubjectTrait |
||
33 | { |
||
34 | |||
35 | /** |
||
36 | * The ID of the parent product to relate the variant with. |
||
37 | * |
||
38 | * @var integer |
||
39 | */ |
||
40 | protected $parentId; |
||
41 | |||
42 | /** |
||
43 | * The value ID of the created media gallery entry. |
||
44 | * |
||
45 | * @var integer |
||
46 | */ |
||
47 | protected $parentValueId; |
||
48 | |||
49 | /** |
||
50 | * The Magento installation directory. |
||
51 | * |
||
52 | * @var string |
||
53 | */ |
||
54 | protected $installationDir; |
||
55 | |||
56 | /** |
||
57 | * The position counter, if no position for the product media gallery value has been specified. |
||
58 | * |
||
59 | * @var integer |
||
60 | */ |
||
61 | protected $positionCounter = 1; |
||
62 | |||
63 | /** |
||
64 | * Set's the ID of the parent product to relate the variant with. |
||
65 | * |
||
66 | * @param integer $parentId The ID of the parent product |
||
67 | * |
||
68 | * @return void |
||
69 | */ |
||
70 | public function setParentId($parentId) |
||
74 | |||
75 | /** |
||
76 | * Return's the ID of the parent product to relate the variant with. |
||
77 | * |
||
78 | * @return integer The ID of the parent product |
||
79 | */ |
||
80 | public function getParentId() |
||
84 | |||
85 | /** |
||
86 | * Set's the value ID of the created media gallery entry. |
||
87 | * |
||
88 | * @param integer $parentValueId The ID of the created media gallery entry |
||
89 | * |
||
90 | * @return void |
||
91 | */ |
||
92 | public function setParentValueId($parentValueId) |
||
96 | |||
97 | /** |
||
98 | * Return's the value ID of the created media gallery entry. |
||
99 | * |
||
100 | * @return integer The ID of the created media gallery entry |
||
101 | */ |
||
102 | public function getParentValueId() |
||
106 | |||
107 | /** |
||
108 | * Reset the position counter to 1. |
||
109 | * |
||
110 | * @return void |
||
111 | */ |
||
112 | public function resetPositionCounter() |
||
116 | |||
117 | /** |
||
118 | * Returns the acutal value of the position counter and raise's it by one. |
||
119 | * |
||
120 | * @return integer The actual value of the position counter |
||
121 | */ |
||
122 | public function raisePositionCounter() |
||
126 | } |
||
127 |