Magento 2 Documentation  2.3
Documentation for Magento 2 CMS v2.3 (December 2018)
BundleWeight.php
Go to the documentation of this file.
1 <?php
7 
11 
16 {
17  const CODE_WEIGHT_TYPE = 'weight_type';
18 
22  protected $arrayManager;
23 
28  {
29  $this->arrayManager = $arrayManager;
30  }
31 
35  public function modifyMeta(array $meta)
36  {
37  $meta = $this->arrayManager->merge(
38  $this->arrayManager->findPath(static::CODE_WEIGHT_TYPE, $meta, null, 'children') . static::META_CONFIG_PATH,
39  $meta,
40  [
41  'valueMap' => [
42  'false' => '1',
43  'true' => '0'
44  ],
45  'validation' => [
46  'required-entry' => false
47  ]
48  ]
49  );
50 
51  $meta = $this->arrayManager->merge(
52  $this->arrayManager->findPath(
54  $meta,
55  null,
56  'children'
57  ) . static::META_CONFIG_PATH,
58  $meta,
59  [
60  'disabled' => true,
61  'visible' => false
62  ]
63  );
64 
65  $meta = $this->arrayManager->merge(
66  $this->arrayManager->findPath(
68  $meta,
69  null,
70  'children'
71  ) . static::META_CONFIG_PATH,
72  $meta,
73  [
74  'imports' => [
75  'disabled' => 'ns = ${ $.ns }, index = ' . static::CODE_WEIGHT_TYPE . ':checked',
76  ]
77  ]
78  );
79 
80  return $meta;
81  }
82 
86  public function modifyData(array $data)
87  {
88  return $data;
89  }
90 }
return false
Definition: gallery.phtml:36