update() protected method

protected update ( )
Beispiel #1
0
 /**
  * {@inheritdoc}
  */
 protected function update()
 {
     if (!parent::update()) {
         return false;
     }
     $fillup = false;
     if ($this->with_program && $this->hasSlotSpotsLeft()) {
         $fillup = true;
     } elseif (!$this->with_program && $this->hasEventSpotsLeft()) {
         $fillup = true;
     }
     if ($fillup) {
         while ($this->generateNewAttendee()) {
             continue;
         }
     }
     return true;
 }