Skip to content

Instantly share code, notes, and snippets.

@ericthehacker
Last active August 1, 2018 13:30
Show Gist options
  • Save ericthehacker/e7a50b87dee8150d76bbfd88cb2b4979 to your computer and use it in GitHub Desktop.
Save ericthehacker/e7a50b87dee8150d76bbfd88cb2b4979 to your computer and use it in GitHub Desktop.
System.xml snippet to inform user of values set in env.php
<?xml version="1.0"?>
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:module:Magento_Config:etc/system_file.xsd">
<system>
<section id="catalog">
<group id="search">
<!-- add messaging for fields which are set in env.php -->
<field id="elasticsearch_server_hostname" translate="label comment" canRestore="1">
<comment>
This field is configured by the server environment. Any changes will not take effect.
</comment>
</field>
<field id="elasticsearch_server_port" translate="label comment" canRestore="1">
<comment>
This field is configured by the server environment. Any changes will not take effect.
</comment>
</field>
</group>
</section>
</system>
</config>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment