Ejemplo n.º 1
0
 /**
  * @inheritdoc
  */
 public function init()
 {
     parent::init();
     $this->mailTemplateStorage = Instance::ensure($this->mailTemplateStorage, TemplateStorage::className());
     if ($this->mailTemplateStorage instanceof TemplateStorageActiveRecord) {
         if ($this->activeRecordClass === null) {
             $this->activeRecordClass = $this->mailTemplateStorage->activeRecordClass;
             $this->templateDataAttributes = $this->mailTemplateStorage->templateDataAttributes;
             $this->templateNameAttribute = $this->mailTemplateStorage->templateNameAttribute;
         }
     }
 }
Ejemplo n.º 2
0
 /**
  * @inheritdoc
  */
 public function init()
 {
     parent::init();
     $this->db = Instance::ensure($this->db, Connection::className());
 }