Пример #1
0
 public function init()
 {
     $this->period = ['month' => null, 'year' => null];
     $this->outSideDb = [];
     $this->outSideOperator = [];
     parent::init();
 }
Пример #2
0
 /**
  * Initialize new entity.
  */
 public function init()
 {
     $this->idAttribute = '_id';
     $this->idAttributeType = static::$idTypeAutoIncrement;
     if ($this->skipInit) {
         return;
     }
     $this->initEntityEvents();
     parent::init();
 }
Пример #3
0
 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]));
             }
         }
     });
 }
Пример #4
0
 public function init()
 {
     $this->attributes = static::magicProperties();
     parent::init();
 }
Пример #5
0
 /**
  * @inheritDoc
  */
 public function init()
 {
     parent::init();
     $this->on(self::EVENT_STATUS_CHANGED, [new Mailer(), 'send']);
 }
Пример #6
0
 public function init()
 {
     return parent::init();
 }
Пример #7
0
 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();
 }