當前位置: 首頁>>代碼示例>>PHP>>正文


PHP Opus_Document::getTitleAbstract方法代碼示例

本文整理匯總了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());
 }
開發者ID:belapp,項目名稱:opus4-application,代碼行數:14,代碼來源:AbstractTest.php

示例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()));
 }
開發者ID:KOBV,項目名稱:opus4-matheon,代碼行數:31,代碼來源:Document.php

示例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) {
開發者ID:belapp,項目名稱:opus4-application,代碼行數:31,代碼來源:find_docs_with_multiple_titles_or_abstracts.php


注:本文中的Opus_Document::getTitleAbstract方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。