5

While doing

setup:upgrade

What Magento actually does to register the unregistered module !!, Can anyone define the flow? Actually I want to send a notification to admin whenever a new module is registered.

Any help would be appreciated..!

Thanks in advance.

1 Answer 1

0

While Creating a module we have a registration.php file which consits:

<?php
/**
 * Copyright © Mageside. All rights reserved.
 * See MS-LICENSE.txt for license details.
 */
\Magento\Framework\Component\ComponentRegistrar::register(
    \Magento\Framework\Component\ComponentRegistrar::MODULE,
    'VendorName_ModuleName',
    __DIR__
);

To check the Module status:php bin/magento module:status

If your Module is in the List of Disabled module then Enable it using:

php bin/magento module:enable VendorName_ModuleName

Then followed by commands(in ubuntu):

    sudo php bin/magento setup:upgrade
(to upgrade your store with the module)
    sudo php bin/magento setup:di:compile
(Generates code and dependency injection configuration)
    sudo php bin/magento cache:flush
    sudo php bin/magento cache:clean
    sudo chmod -R 777 generated/ var/ pub/

Now to Check Your Module Status Again use:

php bin/magento module:status

Your Module Will be now in the list Of enabled Module And Done Your Module is Successfully Registered by magneto

1
  • I am not asking it, you got me wrong I am asking the flow to registration of Module what Magento does! I need to take one of their functionality to implement on it. I want to show last registered module, Thanks. Dec 12, 2019 at 5:48

Your Answer

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

Not the answer you're looking for? Browse other questions tagged or ask your own question.