Example #1
0
     $updateStatus = true;
     if (is_null($form_error)) {
         if (!is_null($performer_name)) {
             $updateStatus = $p->updatePerformerName($performer_name);
         }
         if ($updateStatus && !is_null($performer_date_of_birth)) {
             $p->updatePerformerDateOfBirth($performer_date_of_birth);
         }
         if ($updateStatus) {
             $p->updatePerformerBio($performer_bio);
         }
         if ($updateStatus && !is_null($performer_cover)) {
             $p->updatePerformerCover($performer_cover);
         }
         if ($updateStatus) {
             $p->refresh();
             $status_message = WEB::_success('Performer Successfully updated!');
         } else {
             $status_message = WEB::_error('There is an error when you were updating the Performer.', null);
         }
     } else {
         $status_message = WEB::_error('There is an error when you were updating the Performer. Please review the form below!', $form_error);
     }
     // Handle adding multiple Bands
     if ($b->updateBandsWithPerformerId($p->getPerformerId(), WEB::_select('band_ids'))) {
         $bandmateList = $b->getBandmateAsSelectWithPerformerId($p->getPerformerId());
         $status_message = WEB::_success('Bands Updated Successfully!');
     } else {
         $status_message = WEB::_error('There is an error when you were updating the Bands.', null);
     }
 } else {