//
// Persons
//
$submitter = new Opus_Person();
$submitter->getField('Email')->setValidator(null);
$submitter->setFirstName(randString($counter++))->setLastName(randString($counter++))->setEmail(randString($counter++))->setAcademicTitle(randString($counter++))->setDateOfBirth(randString($counter++))->setPlaceOfBirth(randString($counter++));
$doc->addPersonSubmitter($submitter);
$author = new Opus_Person();
$author->getField('Email')->setValidator(null);
$author->setFirstName(randString($counter++))->setLastName(randString($counter++))->setEmail(randString($counter++))->setAcademicTitle(randString($counter++))->setDateOfBirth(randString($counter++))->setPlaceOfBirth(randString($counter++));
$doc->addPersonAuthor($author);
$referee = new Opus_Person();
$referee->setFirstName('Gyro' . randString($counter++));
$referee->setLastName('Gearloose' . randString($counter++));
$referee->setAcademicTitle('Prof. Dr.' . randString($counter++));
$doc->addPersonReferee($referee);
$editor = new Opus_Person();
$editor->setFirstName('Bob' . randString($counter++));
$editor->setLastName('Foster' . randString($counter++));
$doc->addPersonEditor($editor);
$advisor = new Opus_Person();
$advisor->setFirstName('Fred' . randString($counter++));
$advisor->setLastName('Clever' . randString($counter++));
$doc->addPersonAdvisor($advisor);
$translator = new Opus_Person();
$translator->setFirstName('Erika' . randString($counter++));
$translator->setLastName('Fuchs' . randString($counter++));
$doc->addPersonTranslator($translator);
$contributor = new Opus_Person();
$contributor->setFirstName('Jeff' . randString($counter++));
$contributor->setLastName('Smart' . randString($counter++));
Пример #2
0
 /**
  * Rejects documents and adds the given Person as referee.
  *
  * @param array $docIds
  * @param mixed $userId
  * @param Opus_Person $person
  *
  * FIXME capture success or failure for display afterwards
  */
 public function reject(array $docIds = null, $userId = null, $person = null)
 {
     $logger = Zend_Registry::get('Zend_Log');
     foreach ($docIds as $docId) {
         $logger->debug('Deleting document with id: ' . $docId);
         $document = new Opus_Document($docId);
         if (isset($person)) {
             $document->addPersonReferee($person);
         }
         $enrichment = $document->addEnrichment();
         $enrichment->setKeyName('review.rejected_by')->setValue($userId);
         $document->delete();
     }
     return;
 }