public function init() { $this->period = ['month' => null, 'year' => null]; $this->outSideDb = []; $this->outSideOperator = []; parent::init(); }
/** * Initialize new entity. */ public function init() { $this->idAttribute = '_id'; $this->idAttributeType = static::$idTypeAutoIncrement; if ($this->skipInit) { return; } $this->initEntityEvents(); parent::init(); }
public function init() { parent::init(); $this->on(self::EVENT_STATUS_CHANGED, function (RoomStatusChangedEvent $event) { if ($event->roomStatus === self::STATUS_CONSIDIRATION) { (new Mailer())->send($event); } else { $request = $event->request; $count = Participant::find()->where(['log' => ['$elemMatch' => ['requestId' => $request->_id, 'status' => self::STATUS_CONSIDIRATION]]])->count(); if ($count === 0) { $request->status = Request::STATUS_OSKR_CONSIDERATION; $request->save(false); $request->trigger(Request::EVENT_STATUS_CHANGED, new RequestStatusChangedEvent(['request' => $request])); } } }); }
public function init() { $this->attributes = static::magicProperties(); parent::init(); }
/** * @inheritDoc */ public function init() { parent::init(); $this->on(self::EVENT_STATUS_CHANGED, [new Mailer(), 'send']); }
public function init() { return parent::init(); }
public function init() { $this->numberId = null; $this->employeeId = null; $this->duration = ['from' => null, 'to' => null]; $this->numberPossession = ['from' => null, 'to' => null]; $this->complete = false; $this->destination = ""; parent::init(); }