|
Open Journal Systems
3.3.0
|
Static Public Member Functions | |
| static | logFilePath () |
Data Fields | |
| const | PUBID_TO_ORCID_EXT_ID = ["doi" => "doi", "other::urn" => "urn"] |
| const | USER_GROUP_TO_ORCID_ROLE = ["Author" => "AUTHOR", "Translator" => "CHAIR_OR_TRANSLATOR","Journal manager"=>"AUTHOR"] |
Data Fields inherited from Plugin | |
| $pluginCategory | |
| $pluginPath | |
| $request | |
Additional Inherited Members | |
Protected Member Functions inherited from Plugin | |
| _registerTemplateResource ($inCore=false) | |
ORCID Profile plugin class.
Definition at line 35 of file OrcidProfilePlugin.inc.php.
| OrcidProfilePlugin::authorFormFilter | ( | $output, | |
| $templateMgr | |||
| ) |
Output filter adds ORCiD interaction to contributors metadata add/edit form.
| $output | string |
| $templateMgr | TemplateManager |
Definition at line 409 of file OrcidProfilePlugin.inc.php.
References getIcon(), and Plugin\getTemplateResource().
| OrcidProfilePlugin::buildOAuthUrl | ( | $handlerMethod, | |
| $redirectParams | |||
| ) |
Return an ORCID OAuth authorization link with
| $handlerMethod | string containting a valid method of the OrcidHandler |
| $redirectParams | Array associative array with additional request parameters for the redirect URL |
Definition at line 313 of file OrcidProfilePlugin.inc.php.
References Plugin\$request, PKPApplication\get(), getOauthPath(), getSetting(), and isMemberApiEnabled().
Referenced by handleUserPublicProfileDisplay(), registrationFilter(), and sendAuthorMail().
| OrcidProfilePlugin::buildOrcidWork | ( | $publication, | |
| $context, | |||
| $authors, | |||
| $request, | |||
$issue = null |
|||
| ) |
Build an associative array with submission meta data, which can be encoded to a valid ORCID work JSON structure.
| Submission | $submission | the submission we want to extract data from. |
| Publication | $publication | extract data from this Article |
| Journal | $context | Context object the Submission is part of |
| Author[] | $authors | Array of Author objects, the contributors of the publication |
| Issue | $issue | Issue the Article is part of |
| Request | $request | the current request |
Definition at line 985 of file OrcidProfilePlugin.inc.php.
References Plugin\$request, PKPServices\get(), PluginRegistry\getPlugin(), and PluginRegistry\loadCategory().
Referenced by sendSubmissionToOrcid().
| OrcidProfilePlugin::collectUserOrcidId | ( | $hookName, | |
| $params | |||
| ) |
Collect the ORCID when registering a user.
| $hookName | string |
| $params | array |
Definition at line 456 of file OrcidProfilePlugin.inc.php.
| OrcidProfilePlugin::getActions | ( | $request, | |
| $actionArgs | |||
| ) |
Reimplemented from Plugin.
Definition at line 567 of file OrcidProfilePlugin.inc.php.
References Plugin\$request, getDisplayName(), Plugin\getEnabled(), and LazyLoadPlugin\getName().
| OrcidProfilePlugin::getDescription | ( | ) |
Get a description of this plugin.
Reimplemented from Plugin.
Definition at line 533 of file OrcidProfilePlugin.inc.php.
| OrcidProfilePlugin::getDisplayName | ( | ) |
Get the display name for this plugin.
Reimplemented from Plugin.
Definition at line 526 of file OrcidProfilePlugin.inc.php.
Referenced by getActions().
| OrcidProfilePlugin::getHandlerPath | ( | ) |
Get page handler path for this plugin.
Definition at line 138 of file OrcidProfilePlugin.inc.php.
References Plugin\getPluginPath().
| OrcidProfilePlugin::getIcon | ( | ) |
Return a string of the ORCiD SVG icon
Definition at line 649 of file OrcidProfilePlugin.inc.php.
References Core\getBaseDir(), and Plugin\getPluginPath().
Referenced by authorFormFilter(), handleTemplateDisplay(), handleUserPublicProfileDisplay(), and registrationFilter().
| OrcidProfilePlugin::getInstallEmailTemplatesFile | ( | ) |
Reimplemented from Plugin.
Definition at line 540 of file OrcidProfilePlugin.inc.php.
References Plugin\getPluginPath().
| OrcidProfilePlugin::getMailTemplate | ( | $emailKey, | |
$context = null |
|||
| ) |
Instantiate a MailTemplate
| string | $emailKey | |
| Context | $context |
Definition at line 662 of file OrcidProfilePlugin.inc.php.
Referenced by sendAuthorMail().
| OrcidProfilePlugin::getOauthPath | ( | ) |
Return the OAUTH path (prod or sandbox) based on the current API configuration
Definition at line 285 of file OrcidProfilePlugin.inc.php.
References getOrcidUrl().
Referenced by buildOAuthUrl().
| OrcidProfilePlugin::getOrcidUrl | ( | ) |
Return the ORCID website url (prod or sandbox) based on the current API configuration
Definition at line 294 of file OrcidProfilePlugin.inc.php.
References Plugin\$request, PKPApplication\get(), and getSetting().
Referenced by getOauthPath(), handleUserPublicProfileDisplay(), and registrationFilter().
| OrcidProfilePlugin::getSetting | ( | $contextId, | |
| $name | |||
| ) |
Load a setting for a specific journal or load it from the config.inc.php if it is specified there.
| $contextId | int The id of the journal from which the plugin settings should be loaded. |
| $name | string Name of the setting. |
Reimplemented from Plugin.
Definition at line 165 of file OrcidProfilePlugin.inc.php.
References Config\getVar().
Referenced by buildOAuthUrl(), getOrcidUrl(), handleUserPublicProfileDisplay(), isMemberApiEnabled(), logInfo(), register(), and sendSubmissionToOrcid().
| OrcidProfilePlugin::getStyleSheet | ( | ) |
Return the location of the plugin's CSS file
Definition at line 640 of file OrcidProfilePlugin.inc.php.
References Plugin\getPluginPath().
| OrcidProfilePlugin::handleAdditionalFieldNames | ( | $hookName, | |
| $params | |||
| ) |
Add additional ORCID specific fields to the Author and User objects
| $hookName | string |
| $params | array |
Definition at line 511 of file OrcidProfilePlugin.inc.php.
| OrcidProfilePlugin::handleAuthorFormExecute | ( | $hookname, | |
| $args | |||
| ) |
handleAuthorFormexecute sends an e-mail to the author if a specific checkbox was ticked in the author form.
| $hookname | string |
| $args | AuthorForm[] |
Definition at line 431 of file OrcidProfilePlugin.inc.php.
References removeOrcidAccessToken(), and sendAuthorMail().
| OrcidProfilePlugin::handleEditorAction | ( | $hookName, | |
| $args | |||
| ) |
handleEditorAction handles promoting a submission to copyediting.
| $hookName | string Name the hook was registered with |
| $args | array Hook arguments, &$submission, &$editorDecision, &$result, &$recommendation. |
Definition at line 758 of file OrcidProfilePlugin.inc.php.
References DAORegistry\getDAO(), and sendAuthorMail().
| OrcidProfilePlugin::handleFormDisplay | ( | $hookName, | |
| $args | |||
| ) |
Hook callback to handle form display. Registers output filter for public user profile and author form.
| $hookName | string |
| $args | Form[] |
Definition at line 206 of file OrcidProfilePlugin.inc.php.
References Plugin\$request, PKPApplication\get(), and PKPTemplateManager\getManager().
| OrcidProfilePlugin::handlePublicationStatusChange | ( | $hookName, | |
| $args | |||
| ) |
handlePublishIssue sends all submissions for which the authors hava an ORCID and access token to ORCID. This hook will be called on publication of a new issue.
Definition at line 732 of file OrcidProfilePlugin.inc.php.
References Plugin\$request, PKPApplication\get(), and sendSubmissionToOrcid().
| OrcidProfilePlugin::handleSubmissionSubmitStep3FormExecute | ( | $hookName, | |
| $params | |||
| ) |
Output filter adds ORCiD interaction to the 3rd step submission form.
| $output | string |
| $templateMgr | TemplateManager |
Definition at line 472 of file OrcidProfilePlugin.inc.php.
References Plugin\$request, PKPApplication\get(), and DAORegistry\getDAO().
| OrcidProfilePlugin::handleTemplateDisplay | ( | $hookName, | |
| $args | |||
| ) |
Hook callback: register output filter for user registration and article display.
| $hookName | string |
| $args | array |
Definition at line 241 of file OrcidProfilePlugin.inc.php.
References Plugin\$request, PKPApplication\get(), and getIcon().
| OrcidProfilePlugin::handleUserPublicProfileDisplay | ( | $hookName, | |
| $params | |||
| ) |
Renders additional content for the PublicProfileForm.
Called by
| $output | string |
| $templateMgr | TemplateManager |
Definition at line 379 of file OrcidProfilePlugin.inc.php.
References Plugin\$request, buildOAuthUrl(), PKPApplication\get(), getIcon(), getOrcidUrl(), getSetting(), and Plugin\getTemplateResource().
| OrcidProfilePlugin::isGloballyConfigured | ( | ) |
Check if there exist a valid orcid configuration section in the global config.inc.php of OJS.
Definition at line 187 of file OrcidProfilePlugin.inc.php.
References Config\getVar().
| OrcidProfilePlugin::isMemberApiEnabled | ( | $contextId | ) |
Definition at line 1275 of file OrcidProfilePlugin.inc.php.
References getSetting().
Referenced by buildOAuthUrl(), sendAuthorMail(), and sendSubmissionToOrcid().
| OrcidProfilePlugin::logError | ( | $message | ) |
Write error message to log.
| $message | string Message to write |
Definition at line 1233 of file OrcidProfilePlugin.inc.php.
Referenced by sendSubmissionToOrcid().
|
static |
Definition at line 1223 of file OrcidProfilePlugin.inc.php.
References Config\getVar().
| OrcidProfilePlugin::logInfo | ( | $message | ) |
Write info message to log.
| $message | string Message to write |
Definition at line 1243 of file OrcidProfilePlugin.inc.php.
References getSetting().
Referenced by sendSubmissionToOrcid().
| OrcidProfilePlugin::manage | ( | $args, | |
| $request | |||
| ) |
Reimplemented from Plugin.
Definition at line 600 of file OrcidProfilePlugin.inc.php.
References Plugin\$request, and PKPTemplateManager\getManager().
| OrcidProfilePlugin::register | ( | $category, | |
| $path, | |||
$mainContextId = null |
|||
| ) |
Load and initialize the plug-in and register plugin hooks.
For backwards compatibility this method will be called whenever the plug-in's category is being loaded. If, however, registerOn() returns an array then this method will only be called when the plug-in is enabled and an entry in the result set of registerOn() matches the current request operation. An empty array matches all request operations.
| $category | String Name of category plugin was registered to |
| $path | String The path the plugin was found in |
| $mainContextId | integer To identify if the plugin is enabled we need a context. This context is usually taken from the request but sometimes there is no context in the request (e.g. when executing CLI commands). Then the main context can be given as an explicit ID. |
Reimplemented from LazyLoadPlugin.
Definition at line 45 of file OrcidProfilePlugin.inc.php.
References LazyLoadPlugin\getCurrentContextId(), Plugin\getEnabled(), getSetting(), Config\getVar(), and HookRegistry\register().
| OrcidProfilePlugin::registrationFilter | ( | $output, | |
| $templateMgr | |||
| ) |
Output filter adds ORCiD interaction to registration form.
| $output | string |
| $templateMgr | TemplateManager |
Definition at line 346 of file OrcidProfilePlugin.inc.php.
References Plugin\$request, buildOAuthUrl(), PKPApplication\get(), getIcon(), getOrcidUrl(), and Plugin\getTemplateResource().
| OrcidProfilePlugin::removeOrcidAccessToken | ( | $author, | |
$saveAuthor = true |
|||
| ) |
Remove all data fields, which belong to an ORCID access token from the given Author object. Also updates fields in the db.
| $author | Author object with ORCID access token |
Definition at line 1207 of file OrcidProfilePlugin.inc.php.
References DAORegistry\getDAO().
Referenced by handleAuthorFormExecute(), and sendSubmissionToOrcid().
| OrcidProfilePlugin::sendAuthorMail | ( | $author, | |
$updateAuthor = false |
|||
| ) |
Send mail with ORCID authorization link to the e-mail address of the supplied Author object.
| Author | $author | |
| bool | $updateAuthor | If true update the author fields in the database. Use this only if not called from a function, which does this anyway. |
Definition at line 674 of file OrcidProfilePlugin.inc.php.
References Plugin\$request, buildOAuthUrl(), PKPApplication\get(), DAORegistry\getDAO(), getMailTemplate(), and isMemberApiEnabled().
Referenced by handleAuthorFormExecute(), and handleEditorAction().
| OrcidProfilePlugin::sendSubmissionToOrcid | ( | $publication, | |
| $request | |||
| ) |
sendSubmissionToOrcid posts JSON consisting of submission, journal and issue meta data to ORCID profiles of submission authors.
| $publication | Publication for which the data will be sent to ORCID |
| $submission | Submission for which the data will be sent to ORCID |
Definition at line 795 of file OrcidProfilePlugin.inc.php.
References Plugin\$request, buildOrcidWork(), PKPServices\get(), DAORegistry\getDAO(), getSetting(), Config\getVar(), isMemberApiEnabled(), logError(), logInfo(), and removeOrcidAccessToken().
Referenced by handlePublicationStatusChange().
| OrcidProfilePlugin::setCurrentContextId | ( | $contextId | ) |
Set the current id of the context (atm only considered for logging settings).
| $contextId | int the Id of the currently active context (journal) |
Definition at line 1268 of file OrcidProfilePlugin.inc.php.
| OrcidProfilePlugin::setupCallbackHandler | ( | $hookName, | |
| $params | |||
| ) |
Hook callback: register pages for each sushi-lite method This URL is of the form: orcidapi/{$orcidrequest}
Definition at line 147 of file OrcidProfilePlugin.inc.php.
References Plugin\getEnabled().
| OrcidProfilePlugin::smartyPluginUrl | ( | $params, | |
| $smarty | |||
| ) |
Extend the {url ...} smarty to support this plugin.
Reimplemented from Plugin.
Definition at line 547 of file OrcidProfilePlugin.inc.php.
References Plugin\getCategory(), and LazyLoadPlugin\getName().
| const OrcidProfilePlugin::PUBID_TO_ORCID_EXT_ID = ["doi" => "doi", "other::urn" => "urn"] |
Definition at line 36 of file OrcidProfilePlugin.inc.php.
| const OrcidProfilePlugin::USER_GROUP_TO_ORCID_ROLE = ["Author" => "AUTHOR", "Translator" => "CHAIR_OR_TRANSLATOR","Journal manager"=>"AUTHOR"] |
Definition at line 37 of file OrcidProfilePlugin.inc.php.