Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

pkp/pkp-lib#10292 Controlled vocab dao to eloquent model #127

Open
wants to merge 3 commits into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 8 additions & 5 deletions CitationStyleLanguagePlugin.php
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@
use APP\submission\Submission;
use APP\template\TemplateManager;
use Exception;
use PKP\controlledVocab\ControlledVocab;
use PKP\core\JSONMessage;
use PKP\core\PKPApplication;
use PKP\core\PKPRequest;
Expand All @@ -40,8 +41,6 @@
use PKP\linkAction\request\AjaxModal;
use PKP\plugins\GenericPlugin;
use PKP\plugins\Hook;
use PKP\submission\SubmissionKeywordDAO;
use PKP\submission\SubmissionLanguageDAO;
use Seboettg\CiteProc\CiteProc;
use stdClass;

Expand Down Expand Up @@ -417,9 +416,13 @@ public function getCitation(PKPRequest $request, Submission $submission, string
$chapter = $this->application === 'omp' ? $this->getChapter($request, $publication) : null;
}
$this->setDocumentType($chapter);
/** @var SubmissionKeywordDAO $submissionKeywordDao */
$submissionKeywordDao = DAORegistry::getDAO('SubmissionKeywordDAO');
$keywords = $submissionKeywordDao->getKeywords($publication->getId(), [Locale::getSupportedLocales()]);

$keywords = Repo::controlledVocab()->getBySymbolic(
ControlledVocab::CONTROLLED_VOCAB_SUBMISSION_KEYWORD,
Application::ASSOC_TYPE_PUBLICATION,
$publication->getId(),
$context->getSupportedLocales()
);

$citationData = new stdClass();

Expand Down