Using the Pixel & Tonic Contact Form plugin, I added a config file (config/contactform.php
) to override plugin settings from the CP.
I would like to change some settings if devMode is enabled : recipients from the contact form plugin, to separate my tests addresses from my client addresses.
<?php
$recipients = array(
'devMode' => 'example@domain.com,example@domain.com',
'prodMode' => 'john@doe.com,jean@dupont.com'
);
if (devMode == true) {
$recipients = $recipients['devMode'];
} else {
$recipients = $recipients['prodMode'];
}
return array(
'toEmail' => ($recipients ?: null),
How can I check if devMode == true? Can I access to this value using craft()->config
or something else that?