33 * Copyright © Magento, Inc. All rights reserved.
44 * See COPYING.txt for license details.
55 */
6+ declare (strict_types=1 );
7+
68namespace Magento \Bundle \Block \Adminhtml \Catalog \Product \Edit \Tab \Bundle ;
79
810use Magento \Framework \Data \Form \Element \AbstractElement ;
11+ use Magento \Store \Model \Store ;
912
13+ /**
14+ * Block for rendering option of bundle product
15+ *
16+ * Class \Magento\Bundle\Block\Adminhtml\Catalog\Product\Edit\Tab\Bundle\Option
17+ */
1018class Option extends \Magento \Backend \Block \Widget
1119{
1220 /**
@@ -79,6 +87,8 @@ protected function _construct()
7987 }
8088
8189 /**
90+ * Return Field Id
91+ *
8292 * @return string
8393 */
8494 public function getFieldId ()
@@ -87,6 +97,8 @@ public function getFieldId()
8797 }
8898
8999 /**
100+ * Return Field Name
101+ *
90102 * @return string
91103 */
92104 public function getFieldName ()
@@ -108,6 +120,8 @@ public function getProduct()
108120 }
109121
110122 /**
123+ * Render
124+ *
111125 * @param AbstractElement $element
112126 * @return string
113127 */
@@ -118,6 +132,8 @@ public function render(AbstractElement $element)
118132 }
119133
120134 /**
135+ * Set Element
136+ *
121137 * @param AbstractElement $element
122138 * @return $this
123139 */
@@ -128,6 +144,8 @@ public function setElement(AbstractElement $element)
128144 }
129145
130146 /**
147+ * Get Element
148+ *
131149 * @return AbstractElement|null
132150 */
133151 public function getElement ()
@@ -136,6 +154,8 @@ public function getElement()
136154 }
137155
138156 /**
157+ * Return Is Multi Websites
158+ *
139159 * @return bool
140160 */
141161 public function isMultiWebsites ()
@@ -144,6 +164,8 @@ public function isMultiWebsites()
144164 }
145165
146166 /**
167+ * Prepare Layout
168+ *
147169 * @return $this
148170 */
149171 protected function _prepareLayout ()
@@ -184,6 +206,8 @@ protected function _prepareLayout()
184206 }
185207
186208 /**
209+ * Get Add Button Html
210+ *
187211 * @return string
188212 */
189213 public function getAddButtonHtml ()
@@ -192,6 +216,8 @@ public function getAddButtonHtml()
192216 }
193217
194218 /**
219+ * Get Close Search Button Html
220+ *
195221 * @return string
196222 */
197223 public function getCloseSearchButtonHtml ()
@@ -200,6 +226,8 @@ public function getCloseSearchButtonHtml()
200226 }
201227
202228 /**
229+ * Get Add Selection Button Html
230+ *
203231 * @return string
204232 */
205233 public function getAddSelectionButtonHtml ()
@@ -239,6 +267,8 @@ public function getOptions()
239267 }
240268
241269 /**
270+ * Get Add Button Id
271+ *
242272 * @return mixed
243273 */
244274 public function getAddButtonId ()
@@ -248,6 +278,8 @@ public function getAddButtonId()
248278 }
249279
250280 /**
281+ * Get Options Delete Button Html
282+ *
251283 * @return string
252284 */
253285 public function getOptionDeleteButtonHtml ()
@@ -256,6 +288,8 @@ public function getOptionDeleteButtonHtml()
256288 }
257289
258290 /**
291+ * Get Selection Html
292+ *
259293 * @return string
260294 */
261295 public function getSelectionHtml ()
@@ -264,6 +298,8 @@ public function getSelectionHtml()
264298 }
265299
266300 /**
301+ * Get Type Select Html
302+ *
267303 * @return mixed
268304 */
269305 public function getTypeSelectHtml ()
@@ -286,6 +322,8 @@ public function getTypeSelectHtml()
286322 }
287323
288324 /**
325+ * Get Require Select Html
326+ *
289327 * @return mixed
290328 */
291329 public function getRequireSelectHtml ()
@@ -304,10 +342,12 @@ public function getRequireSelectHtml()
304342 }
305343
306344 /**
345+ * Return Is Default Store
346+ *
307347 * @return bool
308348 */
309349 public function isDefaultStore ()
310350 {
311- return $ this ->getProduct ()->getStoreId () == ' 0 ' ;
351+ return $ this ->getProduct ()->getStoreId () == Store:: DEFAULT_STORE_ID ;
312352 }
313353}
0 commit comments