0

Select objects to log actions when any admin users perform in the backend how to do?

system.xml

    <?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>
    <tab id="vendor" translate="label" class="vendor" sortOrder="800">
        <label>Vendor Extensions</label>
    </tab>  
    <section id="vendor_module" translate="label" sortOrder="500" showInDefault="1" showInWebsite="1" showInStore="1">
        <label>Admin Action Log</label>
        <tab>vendor</tab>
        <resource>Vendor_Module::config</resource>
        <group id="general" translate="label" type="text" sortOrder="30" showInDefault="1" showInWebsite="0" showInStore="0">
            <label>General Configuration</label>
            <field id="enabled" translate="label" type="select" sortOrder="50" showInDefault="1" showInWebsite="1" showInStore="1">
                <label>Enabled</label>
                <source_model>Magento\Config\Model\Config\Source\Yesno</source_model>
            </field>
            <field id="clear_action_logs_days" translate="label" type="text" sortOrder="60" showInDefault="1" showInWebsite="0" showInStore="0">
                <label>Automatically Clear Action Logs after ... Days</label>
                <validate>validate-number validate-zero-or-greater</validate>
            </field>
            <field id="enable_objects" translate="label" type="multiselect" sortOrder="110" showInDefault="1" showInWebsite="0" showInStore="0">
                <label>Enable Objects</label>
                 <source_model>vendor\module\Model\Config\Source\Options</source_model>
                <!--frontend_model>vendor\module\Block\Adminhtml\System\Config\Form\Field\Checkboxes</frontend_model-->
               
            </field>
        </group>
    </section>
</system>

enter image description here

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.