How to get all the disable module list Programmatically in Magento 2?

You can get the list of all the disabled module in Magento 2 by manually from app/etc/config.php.

Module with value equals to 0 is disable the module.

‘Klarna_Core’ => 0, Klarna Core is disable for system.

You can get all the Disable module list using Magento\Framework\Module\FullModuleList and Magento\Framework\Module\ModuleList class. Continue reading “How to get all the disable module list Programmatically in Magento 2?”

Magento 2 Get all the module list programmatically.

You can get the list of available modules in Magento 2. You can manually check your all the module list from app/etc/config.php

You can get all the Active module list using Magento\Framework\Module\FullModuleList class.

FullModuleList.php class used for getting all the module in Magento 2 whether its enable or disabled. Continue reading “Magento 2 Get all the module list programmatically.”

How to get Dependent(Sequence) module list of a specific module programmatically in Magento 2?

You can get the list of dependent module and schema version for a specific module using programmatically by Magento\Framework\Module\ModuleList class.

You can manually check the list of the dependent module for a module using an etc/module.xml file.

Let’s we Check the dependency list for a Catalog Module. you can check the module.xml file for catalog module is,

<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:Module/etc/module.xsd">
    <module name="Magento_Catalog" >
        <sequence>
            <module name="Magento_Eav"/>
            <module name="Magento_Cms"/>
            <module name="Magento_Indexer"/>
            <module name="Magento_Customer"/>
        </sequence>
    </module>
</config>

you can check above XML, There are four modules on which catalog is dependent.  Continue reading “How to get Dependent(Sequence) module list of a specific module programmatically in Magento 2?”