本文整理匯總了PHP中Opus_Document::getTitleAbstract方法的典型用法代碼示例。如果您正苦於以下問題:PHP Opus_Document::getTitleAbstract方法的具體用法?PHP Opus_Document::getTitleAbstract怎麽用?PHP Opus_Document::getTitleAbstract使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類Opus_Document
的用法示例。
在下文中一共展示了Opus_Document::getTitleAbstract方法的3個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: testGetModel
public function testGetModel()
{
$form = new Admin_Form_Document_Abstract();
$doc = new Opus_Document(146);
$abstracts = $doc->getTitleAbstract();
$abstract = $abstracts[0];
$form->getElement('Id')->setValue($abstract->getId());
$form->getElement('Language')->setValue('eng');
$form->getElement('Value')->setValue('Test Zusammenfassung!');
$model = $form->getModel();
$this->assertEquals($abstract->getId(), $model->getId());
$this->assertEquals('eng', $model->getLanguage());
$this->assertEquals('Test Zusammenfassung!', $model->getValue());
}
示例2: renderPublishMailBody
/**
* Render body of notification mail.
*
* @param string $baseUrlServer
* @param string $baseUrlFiles
* @return string
*/
public function renderPublishMailBody($baseUrlServer, $baseUrlFiles)
{
$baseUrlServer = preg_replace('/[\\/]+$/', '', $baseUrlServer);
$baseUrlFiles = preg_replace('/[\\/]+$/', '', $baseUrlFiles);
$loggedUserModel = new Publish_Model_LoggedUser();
$person = $loggedUserModel->createPerson();
$submitterString = '';
if (!is_null($person) and $person->isValid()) {
$submitterString = trim($person->getFirstName() . " " . $person->getLastName());
}
$titleModels = $this->_document->getTitleMain();
$titleString = '';
if (count($titleModels) > 0) {
$titleString = trim($titleModels[0]->getValue());
}
$abstractModels = $this->_document->getTitleAbstract();
$abstractString = '';
if (count($abstractModels) > 0) {
$abstractString = trim($abstractModels[0]->getValue());
}
$template = new Matheon_Model_Template();
$template->template = APPLICATION_PATH . '/modules/matheon/models/confirmation-mail.template';
return $template->render(array('baseUrlServer' => $baseUrlServer, 'baseUrlFiles' => $baseUrlFiles, 'docId' => $this->getId(), 'submitterString' => $submitterString, 'titleString' => $titleString, 'abstractString' => $abstractString, 'files' => $this->_document->getFile()));
}
示例3: foreach
* Diese Dokumente müssen aktuell manuell behandelt werden, da das Dokument
* sonst nicht fehlerfrei indexiert werden kann (siehe OPUSVIER-2240).
*
*/
$updateRequired = 0;
$docfinder = new Opus_DocumentFinder();
foreach ($docfinder->ids() as $docId) {
$doc = new Opus_Document($docId);
$numOfTitles = 0;
foreach ($doc->getTitleMain() as $title) {
if ($title->getLanguage() === $doc->getLanguage()) {
$numOfTitles++;
}
}
$numOfAbstracts = 0;
foreach ($doc->getTitleAbstract() as $abstract) {
if ($abstract->getLanguage() === $doc->getLanguage()) {
$numOfAbstracts++;
}
}
if ($numOfTitles > 1 || $numOfAbstracts > 1) {
$msg = "document #{$docId} (";
$opusThreeId = $doc->getIdentifierOpus3();
if (count($opusThreeId) > 0) {
$msg .= 'opus3id #' . $opusThreeId[0]->getValue() . ' ';
}
$msg .= 'server_state: ' . $doc->getServerState() . ') needs to be updated manually: has';
if ($numOfTitles > 1) {
$msg .= " {$numOfTitles} titles";
}
if ($numOfAbstracts > 1) {