/** * Checks if a client ID was already set or not * * @return void */ private function checkForClientID() { // fetch client ID $clientId = BackendMailmotorCMHelper::getClientID(); // no client ID set, so redirect to settings with an appropriate error message. if (empty($clientId)) { SpoonHTTP::redirect(BackendModel::createURLForAction('settings', 'mailmotor', BL::getWorkingLanguage())); } // get price per email $pricePerEmail = BackendModel::getModuleSetting('mailmotor', 'price_per_email'); // check if a price per e-mail is set if (empty($pricePerEmail) && $pricePerEmail != 0) { SpoonHTTP::redirect(BackendModel::createURLForAction('settings', 'mailmotor', BL::getWorkingLanguage()) . '&error=no-price-per-email'); } }
/** * Get all necessary data * * @return void */ private function getData() { // fetch the mailmotor settings $settings = BackendModel::getModuleSettings(); // store mailmotor settings $this->settings = $settings['mailmotor']; // check if an account was linked already and/or client ID was set $this->accountLinked = BackendMailmotorCMHelper::checkAccount(); $this->clientID = BackendMailmotorCMHelper::getClientID(); }