Jump to content

Overriding a core module in a custom module


Guest

Recommended Posts

Hi, I am trying to override the contactform module's main php file from another module, but the override is simply not taken into account.

The structure I am using is: my-module/override/modules/contactform/contactform.php

Inside this file is the following code, but it is not executed (die()ing it doesn't do anything at all):

class ContactformOverride extends Contactform implements WidgetInterface
{
    public function renderWidget($hookName = null, array $configuration = [])
    {
        $this->smarty->assign($this->getWidgetVariables($hookName, $configuration));
        return $this->display(__FILE__, 'views/templates/widget/contactform.tpl');
    }
} 

Can anyone shed some light on where the problem could be?

Thank you.

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...