rafaelstz/magento2-quicklink

View on GitHub
etc/adminhtml/system.xml

Summary

Maintainability
Test Coverage
<?xml version="1.0"?><!--
  ~  @author Rafael CorrĂȘa Gomes <rafaelcgstz@gmail.com>
  ~  @copyright Copyright (c) 2020
  -->
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
        xsi:noNamespaceSchemaLocation="urn:magento:module:Magento_Config:etc/system_file.xsd">
    <system>
        <tab id="rafaelcg" translate="label" sortOrder="900">
            <label>Rafaelcg Extensions</label>
        </tab>
        <section id="quicklink" translate="label" type="text" showInDefault="1" showInWebsite="1" showInStore="1">
            <class>separator-top</class>
            <label>Google Quicklink</label>
            <tab>rafaelcg</tab>
            <resource>Rafaelcg_Quicklink::config</resource>
            <group id="general" translate="label comment" type="text" sortOrder="10" showInDefault="1"
                   showInWebsite="1" showInStore="1">
                <label>Google Quicklink</label>
                <comment><![CDATA[
                Faster subsequent page-loads by prefetching in-viewport links during idle time.<br>
                If you have any issue, please <a title="report issue" target="_blank" href="https://github.com/rafaelstz/magento2-quicklink/issues">report here</a>.]]>
                </comment>
                <field id="active" translate="label" type="select" sortOrder="10" showInDefault="1" showInWebsite="1"
                       showInStore="1">
                    <label>Enable</label>
                    <source_model>Magento\Config\Model\Config\Source\Yesno</source_model>
                </field>
                <field id="timeout" translate="label comment" type="text" sortOrder="20" showInDefault="1"
                       showInWebsite="1" showInStore="1" canRestore="1">
                    <label>Timeout</label>
                    <comment>Timeout limit in milliseconds.</comment>
                    <depends>
                        <field id="*/*/active">1</field>
                    </depends>
                    <validate>required-entry</validate>
                </field>
                <field id="request_limit" translate="label comment" type="text" sortOrder="30" showInDefault="1"
                       showInWebsite="1" showInStore="1" canRestore="1">
                    <label>Request limit</label>
                    <comment>The total requests that can be prefetched.</comment>
                    <depends>
                        <field id="*/*/active">1</field>
                    </depends>
                </field>
                <field id="concurrency_limit" translate="label comment" type="text" sortOrder="40" showInDefault="1"
                       showInWebsite="1" showInStore="1" canRestore="1">
                    <label>Throttle</label>
                    <comment>The concurrency limit for simultaneous requests.</comment>
                    <depends>
                        <field id="*/*/active">1</field>
                    </depends>
                </field>
                <field id="priority" translate="label comment" type="select" sortOrder="50" showInDefault="1"
                       showInWebsite="1" showInStore="1" canRestore="1">
                    <label>High Priority</label>
                    <comment>Whether or not the URLs should be treated as high priority.</comment>
                    <depends>
                        <field id="*/*/active">1</field>
                    </depends>
                    <source_model>Magento\Config\Model\Config\Source\Yesno</source_model>
                </field>
                <field id="developer_mode" translate="label comment" type="select" sortOrder="60" showInDefault="1" showInWebsite="1" showInStore="1" canRestore="1">
                    <label>Run in developer mode</label>
                    <comment>Running just in production mode avoid to request extra pages with no static files generated yet.</comment>
                    <depends>
                        <field id="*/*/active">1</field>
                    </depends>
                    <source_model>Magento\Config\Model\Config\Source\Yesno</source_model>
                </field>
            </group>
        </section>
    </system>
</config>