Jump to content

[Solved] Check if module is activate


RomsWebDesign
 Share

Recommended Posts

Exactly.

 

I have solved my issue.

I do that and it seems to work.

    /**
     * Desactivate current module.
     *
     * @param bool $forceAll If true, disable module for all shop
     */
    public function disable($forceAll = false)
    {
        // Disable module for all shops
            parent::disable($forceAll);
            if(!$this->isEnabled())
                parent::uninstallOverrides();
    }

    /**
     * Activate current module.
     *
     * @param bool $forceAll If true, enable module for all shop
     */
    public function enable($forceAll = false)
    {
        if(parent::enable($forceAll))
            parent::installOverrides();
    }

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...

Important Information

Cookies ensure the smooth running of our services. Using these, you accept the use of cookies. Learn More