| @@ 303-316 (lines=14) @@ | ||
| 300 | { |
|
| 301 | $control = $this->programFormFactory->create(); |
|
| 302 | $control->setMeetingId($this->getMeetingId()); |
|
| 303 | $control->onProgramSave[] = function(ProgramForm $control, $program) { |
|
| 304 | //$guid = $this->getParameter('guid'); |
|
| 305 | $id = $this->getParameter('id'); |
|
| 306 | ||
| 307 | $this->setBacklinkFromArray($program); |
|
| 308 | ||
| 309 | if($id) { |
|
| 310 | $this->actionUpdate($id, $program); |
|
| 311 | } else { |
|
| 312 | $this->actionCreate($program); |
|
| 313 | } |
|
| 314 | ||
| 315 | $this->redirect($this->getBacklink() ?: 'Program:listing'); |
|
| 316 | }; |
|
| 317 | ||
| 318 | $control->onProgramReset[] = function(ProgramForm $control, $program) { |
|
| 319 | $this->setBacklinkFromArray($program); |
|
| @@ 353-364 (lines=12) @@ | ||
| 350 | $control = $this->visitorFormFactory->create(); |
|
| 351 | $control->setMeetingId($this->getMeetingId()); |
|
| 352 | ||
| 353 | $control->onVisitorSave[] = function(VisitorForm $control, $visitor) { |
|
| 354 | $id = $this->getParameter('id'); |
|
| 355 | $this->setBacklinkFromArray($visitor); |
|
| 356 | ||
| 357 | if($id) { |
|
| 358 | $this->actionUpdate($id, $visitor); |
|
| 359 | } else { |
|
| 360 | $this->actionCreate($visitor); |
|
| 361 | } |
|
| 362 | ||
| 363 | $this->redirect($this->getBacklink() ?: self::REDIRECT_DEFAULT); |
|
| 364 | }; |
|
| 365 | ||
| 366 | $control->onVisitorReset[] = function(VisitorForm $control, $visitor) { |
|
| 367 | $this->setBacklinkFromArray($visitor); |
|