/** * @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; } } }
/** * @inheritdoc */ public function init() { parent::init(); $this->db = Instance::ensure($this->db, Connection::className()); }