Open Journal Systems
3.3.0
|
Data Fields | |
$_citationDownloads = array() | |
$_citationStyles = array() | |
![]() | |
$pluginCategory | |
$pluginPath | |
$request | |
Additional Inherited Members | |
![]() | |
_registerTemplateResource ($inCore=false) | |
Citation Style Language plugin class.
Definition at line 20 of file CitationStyleLanguagePlugin.inc.php.
CitationStyleLanguagePlugin::downloadCitation | ( | $request, | |
$article, | |||
$citationStyle = 'ris' , |
|||
$issue = null |
|||
) |
Download a citation format
Downloadable citation formats can be used to import into third-party software.
$request | Request |
$article | Submission |
$citationStyle | string Name of the citation style to use. |
$issue | Issue Optional. Will fetch from db if not passed. |
Definition at line 460 of file CitationStyleLanguagePlugin.inc.php.
References DAORegistry\getDAO().
CitationStyleLanguagePlugin::getActions | ( | $request, | |
$actionArgs | |||
) |
Reimplemented from Plugin.
Definition at line 491 of file CitationStyleLanguagePlugin.inc.php.
CitationStyleLanguagePlugin::getArticleTemplateData | ( | $hookName, | |
$args | |||
) |
Retrieve citation information for the article details template. This method is hooked in before a template displays.
$hookname | string |
$args | array |
Definition at line 266 of file CitationStyleLanguagePlugin.inc.php.
References Plugin\$request, getCitation(), getEnabledCitationDownloads(), getEnabledCitationStyles(), PKPTemplateManager\getManager(), and getPrimaryStyleName().
CitationStyleLanguagePlugin::getCitation | ( | $request, | |
$article, | |||
$citationStyle = 'apa' , |
|||
$issue = null , |
|||
$publication = null |
|||
) |
Get a specified citation for a given article
This citation format follows the csl-json schema and takes some direction from existing CSL mappings documented by Zotero and Mendeley.
$request | Request |
$article | Submission |
$citationStyle | string Name of the citation style to use. |
$issue | Issue Optional. Will fetch from db if not passed. |
$publication | Publication Optional. A particular version |
Definition at line 314 of file CitationStyleLanguagePlugin.inc.php.
References Plugin\$request, and DAORegistry\getDAO().
Referenced by getArticleTemplateData().
CitationStyleLanguagePlugin::getCitationDownloads | ( | ) |
Get list of citation download formats available
Definition at line 181 of file CitationStyleLanguagePlugin.inc.php.
References $_citationDownloads, HookRegistry\call(), and Plugin\getTemplateResource().
Referenced by getCitationStyleConfig(), and getEnabledCitationDownloads().
CitationStyleLanguagePlugin::getCitationStyleConfig | ( | $styleId | ) |
Get citation config for a citation ID
$styleId | string Example: 'apa' |
Definition at line 249 of file CitationStyleLanguagePlugin.inc.php.
References getCitationDownloads(), and getCitationStyles().
CitationStyleLanguagePlugin::getCitationStyles | ( | ) |
Get list of citation styles available
Definition at line 65 of file CitationStyleLanguagePlugin.inc.php.
References $_citationStyles, and HookRegistry\call().
Referenced by getCitationStyleConfig(), getEnabledCitationStyles(), and getPrimaryStyleName().
CitationStyleLanguagePlugin::getDescription | ( | ) |
Get a description of this plugin.
Reimplemented from Plugin.
Definition at line 43 of file CitationStyleLanguagePlugin.inc.php.
CitationStyleLanguagePlugin::getDisplayName | ( | ) |
Get the display name for this plugin.
Reimplemented from Plugin.
Definition at line 36 of file CitationStyleLanguagePlugin.inc.php.
CitationStyleLanguagePlugin::getEnabledCitationDownloads | ( | $contextId = 0 | ) |
Get enabled citation styles
$contextId | integer Journal ID |
Definition at line 219 of file CitationStyleLanguagePlugin.inc.php.
References getCitationDownloads(), and Plugin\getSetting().
Referenced by getArticleTemplateData().
CitationStyleLanguagePlugin::getEnabledCitationStyles | ( | $contextId = 0 | ) |
Get enabled citation styles
$contextId | integer Journal ID |
Definition at line 162 of file CitationStyleLanguagePlugin.inc.php.
References getCitationStyles(), and Plugin\getSetting().
Referenced by getArticleTemplateData().
CitationStyleLanguagePlugin::getPrimaryStyleName | ( | $contextId = 0 | ) |
Get the primary style name or default to the first available style
$contextId | integer Journal ID |
Definition at line 139 of file CitationStyleLanguagePlugin.inc.php.
References getCitationStyles(), and Plugin\getSetting().
Referenced by getArticleTemplateData().
CitationStyleLanguagePlugin::loadStyle | ( | $styleConfig | ) |
Load a CSL style and return the contents as a string
$styleConfig | array CSL configuration to load |
Definition at line 440 of file CitationStyleLanguagePlugin.inc.php.
CitationStyleLanguagePlugin::manage | ( | $args, | |
$request | |||
) |
Reimplemented from Plugin.
Definition at line 530 of file CitationStyleLanguagePlugin.inc.php.
CitationStyleLanguagePlugin::mapCitationIds | ( | $citations | ) |
Pluck citation IDs from array of citations
$citations | array See getCitationStyles() |
Definition at line 239 of file CitationStyleLanguagePlugin.inc.php.
CitationStyleLanguagePlugin::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 50 of file CitationStyleLanguagePlugin.inc.php.
References Plugin\getEnabled(), Config\getVar(), and HookRegistry\register().
CitationStyleLanguagePlugin::setPageHandler | ( | $hookName, | |
$params | |||
) |
Route requests for the citation styles to custom page handler
$hookName | string |
$params | array |
Definition at line 557 of file CitationStyleLanguagePlugin.inc.php.
array CitationStyleLanguagePlugin::$_citationDownloads = array() |
List of citation download formats available
Definition at line 31 of file CitationStyleLanguagePlugin.inc.php.
Referenced by getCitationDownloads().
array CitationStyleLanguagePlugin::$_citationStyles = array() |
List of citation styles available
Definition at line 25 of file CitationStyleLanguagePlugin.inc.php.
Referenced by getCitationStyles().