/** * Initialize user model. * This procedure will append events used for initialization of `status` and * `source` attributes. * When `$skipInit` is assigned to `false`, the above processes will be skipped. * If you want to modify or override this method, you should add `parent::init()` * statement at the end of your init() method. */ public function init() { if (!is_string($this->queryClass)) { $this->queryClass = BaseUserQuery::className(); } if ($this->skipInit) { return; } $this->on(self::$eventNewRecordCreated, [$this, 'onInitStatusAttribute']); $this->on(self::$eventNewRecordCreated, [$this, 'onInitSourceAttribute']); $this->on(self::$eventNewRecordCreated, [$this, 'onInitAuthKey']); $this->on(self::$eventNewRecordCreated, [$this, 'onInitAccessToken']); $this->on(self::$eventNewRecordCreated, [$this, 'onInitPasswordResetToken']); $this->on(self::$eventAfterSetPassword, [$this, 'onAfterSetNewPassword']); parent::init(); }
public function init() { $this->queryClass = HeadwordQuery::className(); $this->on(self::EVENT_AFTER_INSERT, [$this, 'onInsertHeadword']); parent::init(); }
public function init() { $this->queryClass = SynonymQuery::className(); $this->on(self::EVENT_BEFORE_DELETE, [$this, 'onDeleteSynonym']); parent::init(); }
public function init() { $this->queryClass = ServerQuery::className(); parent::init(); }
public function init() { $this->queryClass = ExtensionQuery::className(); parent::init(); }
/** * Initialize the blameable model. * If query class is not specified, [[BaseBlameableQuery]] will be taken. */ public function init() { if (!is_string($this->queryClass)) { $this->queryClass = BaseBlameableQuery::className(); } if ($this->skipInit) { return; } $this->initBlameableEvents(); parent::init(); }