Jump to content

[Solved] Check if module is activate


RomsWebDesign

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();
    }
Link to comment
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
×
×
  • Create New...