本文整理汇总了PHP中Opus_Document::addPersonReferee方法的典型用法代码示例。如果您正苦于以下问题:PHP Opus_Document::addPersonReferee方法的具体用法?PHP Opus_Document::addPersonReferee怎么用?PHP Opus_Document::addPersonReferee使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Opus_Document
的用法示例。
在下文中一共展示了Opus_Document::addPersonReferee方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: randString
//
// 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: reject
/**
* 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;
}