Magento 2 Documentation  2.3
Documentation for Magento 2 CMS v2.3 (December 2018)
invalidProductOptionsMergedXmlArray.php
Go to the documentation of this file.
1 <?php
6 return [
7  'options_node_is_required' => [
8  '<?xml version="1.0"?><config><inputType name="name_one" label="Label One"/></config>',
9  ["Element 'inputType': This element is not expected. Expected is ( option ).\nLine: 1\n"],
10  ],
11  'inputType_node_is_required' => [
12  '<?xml version="1.0"?><config><option name="name_one" label="Label One" renderer="one"/></config>',
13  ["Element 'option': Missing child element(s). Expected is ( inputType ).\nLine: 1\n"],
14  ],
15  'options_node_without_required_attributes' => [
16  '<?xml version="1.0"?><config><option name="name_one" label="label one"><inputType name="name" label="one"/>' .
17  '</option><option name="name_two" renderer="renderer"><inputType name="name_two" label="one" /></option>' .
18  '<option label="label three" renderer="renderer"><inputType name="name_one" label="one"/></option></config>',
19  [
20  "Element 'option': The attribute 'renderer' is required but missing.\nLine: 1\n",
21  "Element 'option': The attribute " . "'label' is required but missing.\nLine: 1\n",
22  "Element 'option': The attribute 'name' is required but missing.\nLine: 1\n"
23  ],
24  ],
25  'inputType_node_without_required_attributes' => [
26  '<?xml version="1.0"?><config><option name="name_one" label="label one" renderer="renderer">' .
27  '<inputType name="name_one"/></option><option name="name_two" renderer="renderer" label="label">' .
28  '<inputType label="name_two"/></option></config>',
29  [
30  "Element 'inputType': The attribute 'label' is required but missing.\nLine: 1\n",
31  "Element 'inputType': The " . "attribute 'name' is required but missing.\nLine: 1\n"
32  ],
33  ]
34 ];