你好!
常规 app/etc/di.xml 有一部分,我需要在 reader 数组中添加附加值。
<virtualType name="bodyRenderPool" type="Magento\Framework\View\Layout\ReaderPool">
<arguments>
<argument name="readers" xsi:type="array">
<item name="container" xsi:type="string">Magento\Framework\View\Layout\Reader\Container</item>
<item name="block" xsi:type="string">Magento\Framework\View\Layout\Reader\Block</item>
<item name="move" xsi:type="string">Magento\Framework\View\Layout\Reader\Move</item>
<item name="uiComponent" xsi:type="string">Magento\Framework\View\Layout\Reader\UiComponent</item>
</argument>
</arguments>
</virtualType>
如果在我自己模块的di.xml中注明
<virtualType name="bodyRenderPool" type="Magento\Framework\View\Layout\ReaderPool">
<arguments>
<argument name="readers" xsi:type="array">
<item name="customEl" xsi:type="string">Company\MyModule\View\Layout\Reader\Customel</item>
</argument>
</arguments>
</virtualType>
该数组被覆盖。
如何在 reader 数组中仅添加一个元素?