Esempio n. 1
0
 /**
  * Populates the Person object from the request
  * @return bean Person
  */
 private function getBeanFromRequest()
 {
     global $logger;
     $logger->debug(get_class($this) . "::getBeanFromRequest()");
     $person = new Artist($_REQUEST);
     // related events
     $events = array();
     if (isset($_REQUEST['exhibition'])) {
         foreach ($_REQUEST['exhibition'] as $oid) {
             $event = new Exhibition();
             $event->setOid($oid);
             $events[] = $event;
         }
     }
     if ($events) {
         $logger->debug("Number of related exhibitions in the form: " . count($events));
         $person->setExhibitions($events);
     }
     // gallery
     if (isset($_REQUEST['gallery'])) {
         $person->setGallery($_REQUEST['gallery']);
     }
     return $person;
 }