Example #1
0
 $performer_cover = $msg['file_path'];
 // Passed as: array($performer_name, performer_date_of_birth, performer_bio, performer_cover)
 $form_error = $p->validateParams(array($performer_name, $performer_date_of_birth, $performer_bio, $performer_cover));
 $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 {