Magento 2 Documentation  2.3
Documentation for Magento 2 CMS v2.3 (December 2018)
ConfigurableQty.php
Go to the documentation of this file.
1 <?php
7 
9 
14 {
15  const CODE_QUANTITY = 'qty';
16  const CODE_QTY_CONTAINER = 'quantity_and_stock_status_qty';
17 
21  public function modifyData(array $data)
22  {
23  return $data;
24  }
25 
29  public function modifyMeta(array $meta)
30  {
31  if ($groupCode = $this->getGroupCodeByField($meta, self::CODE_QTY_CONTAINER)) {
32  $parentChildren = &$meta[$groupCode]['children'];
33  if (!empty($parentChildren[self::CODE_QTY_CONTAINER])) {
34  $parentChildren[self::CODE_QTY_CONTAINER] = array_replace_recursive(
35  $parentChildren[self::CODE_QTY_CONTAINER],
36  [
37  'children' => [
38  self::CODE_QUANTITY => [
39  'arguments' => [
40  'data' => [
41  'config' => [
42  'imports' => [
43  'disabled' => '!ns = ${ $.ns }, index = '
45  ],
46  ],
47  ],
48  ],
49  ],
50  ],
51  ]
52  );
53  }
54  }
55 
56  return $meta;
57  }
58 }