Author: Basil Suter (basil@nadar.io)
Inheritance: extends yii\base\Module
Example #1
0
 public function init()
 {
     parent::init();
     if (empty($this->password)) {
         throw new Exception("The basicauth module password can not be empty, please add a password to the module config for basicauth.");
     }
 }
Example #2
0
 /**
  * initializ luya messages
  */
 public function init()
 {
     parent::init();
     $this->registerTranslations();
 }
 /**
  * {@inheritDoc}
  * @see \luya\base\Module::init()
  */
 public function init()
 {
     parent::init();
     if ($this->attributes === null) {
         throw new Exception("The attributes attributed must be defined with an array of available attributes.");
     }
     if ($this->recipients === null) {
         throw new Exception("The recipients attributed must be defined with an array of recipients who will recieve an email.");
     }
 }
Example #4
0
 /**
  * {@inheritDoc}
  * @see \luya\base\Module::init()
  */
 public function init()
 {
     parent::init();
     if ($this->listId === null) {
         throw new Exception("The MailChimp list Id must be defined.");
     }
     if ($this->mailchimpApi === null) {
         throw new Exception("The MailChimp API key must be defined.");
     }
     if ($this->attributes === null) {
         throw new Exception("The attributes attributed must be defined with an array of available attributes.");
     }
 }