In the help section of the module that example would not work:
$cmsmailer = $this->GetModuleInstance('CMSMailer');
should be:
$cmsmailer = cms_utils::get_module('CMSMailer');
CMSMailer example wouldnt work
-
- Support Guru
- Posts: 8169
- Joined: Tue Oct 19, 2004 6:44 pm
- Location: Fernie British Columbia, Canada
Re: CMSMailer example wouldnt work
incorrect.
Both syntaxes are valid.
Both syntaxes are valid.
Follow me on twitter
Please post system information from "Extensions >> System Information" (there is a bbcode option) on all posts asking for assistance.
--------------------
If you can't bother explaining your problem well, you shouldn't expect much in the way of assistance.
Please post system information from "Extensions >> System Information" (there is a bbcode option) on all posts asking for assistance.
--------------------
If you can't bother explaining your problem well, you shouldn't expect much in the way of assistance.
Re: CMSMailer example wouldnt work
But
$cmsmailer = $this->GetModuleInstance('CMSMailer');
is not deprecated?
$cmsmailer = $this->GetModuleInstance('CMSMailer');
is not deprecated?
-
- Support Guru
- Posts: 8169
- Joined: Tue Oct 19, 2004 6:44 pm
- Location: Fernie British Columbia, Canada
Re: CMSMailer example wouldnt work
No it's not deprecated.
Follow me on twitter
Please post system information from "Extensions >> System Information" (there is a bbcode option) on all posts asking for assistance.
--------------------
If you can't bother explaining your problem well, you shouldn't expect much in the way of assistance.
Please post system information from "Extensions >> System Information" (there is a bbcode option) on all posts asking for assistance.
--------------------
If you can't bother explaining your problem well, you shouldn't expect much in the way of assistance.
Re: CMSMailer example wouldnt work
Set up a UDT with the example code, ran it, didn't work. Changed the UDT to use cms_utils::get_module('CMSMailer'), ran it, it worked.
-
- Support Guru
- Posts: 8169
- Joined: Tue Oct 19, 2004 6:44 pm
- Location: Fernie British Columbia, Canada
Re: CMSMailer example wouldnt work
Of course the example won't work from a UDT. $this->GetModuleInstance() is a module API method.
Issue closed.
Issue closed.
Follow me on twitter
Please post system information from "Extensions >> System Information" (there is a bbcode option) on all posts asking for assistance.
--------------------
If you can't bother explaining your problem well, you shouldn't expect much in the way of assistance.
Please post system information from "Extensions >> System Information" (there is a bbcode option) on all posts asking for assistance.
--------------------
If you can't bother explaining your problem well, you shouldn't expect much in the way of assistance.