Open Journal Systems  3.3.0
MarkupPlugin Class Reference
Inheritance diagram for MarkupPlugin:
GenericPlugin LazyLoadPlugin Plugin

Public Member Functions

 callbackLoadBatchHandler ($hookName, $args)
 
 callbackLoadCategory ($hookName, $args)
 
 callbackLoadMarkupHandler ($hookName, $args)
 
 callbackShowArticlesBatchConversionTabs ($hookName, $args)
 
 callbackShowWebsiteSettingsTabs ($hookName, $args)
 
 callbackSubmissionFileDeleted ($hookName, $params)
 
 callbackUserProfile ($hookName, $params)
 
 fetchGateway ($fileId, $stageId, $target)
 
 getActions ($request, $verb)
 
 getContextSpecificPluginSettingsFile ()
 
 getCssUrl ($request)
 
 getDescription ()
 
 getDisplayName ()
 
 getFormatList ()
 
 getInstallSchemaFile ()
 
 getJsPath ()
 
 getJsUrl ($request)
 
 getName ()
 
 getOTSLoginParametersForJournal ($journalId, $user=null)
 
 getXmlConversionStages ()
 
 manage ($args, $request)
 
 register ($category, $path, $mainContextId=null)
 
 templateFetchCallback ($hookName, $params)
 
- Public Member Functions inherited from LazyLoadPlugin
 getCanDisable ()
 
 getCanEnable ()
 
 getCurrentContextId ()
 
 getEnabled ($contextId=null)
 
 setEnabled ($enabled)
 
- Public Member Functions inherited from Plugin
 __construct ()
 
 _overridePluginTemplates ($hookName, $args)
 
 addLocaleData ($locale=null)
 
 getCategory ()
 
 getCurrentVersion ()
 
 getDirName ()
 
 getEnabled ()
 
 getHideManagement ()
 
 getInstallControlledVocabFiles ()
 
 getInstallDataFile ()
 
 getInstallEmailTemplateDataFile ()
 
 getInstallEmailTemplatesFile ()
 
 getInstallFilterConfigFiles ()
 
 getInstallMigration ()
 
 getInstallSitePluginSettingsFile ()
 
 getLocaleFilename ($locale)
 
 getPluginPath ()
 
getRequest ()
 
 getSeq ()
 
 getSetting ($contextId, $name)
 
 getTemplatePath ($inCore=false)
 
 getTemplateResource ($template=null, $inCore=false)
 
 import ($class)
 
 installContextSpecificSettings ($hookName, $args)
 
 installControlledVocabs ($hookName, $args)
 
 installData ($hookName, $args)
 
 installEmailTemplateData ($hookName, $args)
 
 installEmailTemplates ($hookName, $args)
 
 installFilters ($hookName, $args)
 
 installLocale ($hookName, $args)
 
 installSiteSettings ($hookName, $args)
 
 isSitePlugin ()
 
 smartyPluginUrl ($params, $smarty)
 
 updateSchema ($hookName, $args)
 
 updateSetting ($contextId, $name, $value, $type=null)
 

Protected Attributes

 $_formatList = array('epub','xml','pdf')
 
 $_xmlConversionStages = array(WORKFLOW_STAGE_ID_SUBMISSION,WORKFLOW_STAGE_ID_INTERNAL_REVIEW,WORKFLOW_STAGE_ID_EXTERNAL_REVIEW,WORKFLOW_STAGE_ID_EDITING,WORKFLOW_STAGE_ID_PRODUCTION)
 

Additional Inherited Members

- Data Fields inherited from Plugin
 $pluginCategory
 
 $pluginPath
 
 $request
 
- Protected Member Functions inherited from Plugin
 _registerTemplateResource ($inCore=false)
 

Detailed Description

NLM XML and HTML transform plugin class.

Specification:

When an author, copyeditor or editor uploads a new version (odt, docx, doc, or pdf format) of a submission, this module submits it to the Document Markup Server specified in the configuration file.

manifest.xml document-new.pdf (layout version of PDF) document-review.pdf (review version of PDF, header author info stripped) document.xml (NLM-XML3/JATS-compliant) document.html (web-viewable article version)

This plugin extracts the xml, epub and pdf versions and places them in the galley.

Definition at line 32 of file MarkupPlugin.inc.php.

Member Function Documentation

◆ callbackLoadBatchHandler()

MarkupPlugin::callbackLoadBatchHandler (   $hookName,
  $args 
)
See also
PKPPageRouter::route()

Definition at line 337 of file MarkupPlugin.inc.php.

References $op, and Plugin\getPluginPath().

◆ callbackLoadCategory()

MarkupPlugin::callbackLoadCategory (   $hookName,
  $args 
)
See also
PluginRegistry::loadCategory()

Definition at line 136 of file MarkupPlugin.inc.php.

References getName().

◆ callbackLoadMarkupHandler()

MarkupPlugin::callbackLoadMarkupHandler (   $hookName,
  $args 
)

◆ callbackShowArticlesBatchConversionTabs()

MarkupPlugin::callbackShowArticlesBatchConversionTabs (   $hookName,
  $args 
)

Extend the website settings tabs to include articles batch conversion

Parameters
$hookNamestring The name of the invoked hook
$argsarray Hook parameters
Returns
boolean Hook handling status

Definition at line 286 of file MarkupPlugin.inc.php.

References Plugin\$request, and Registry\get().

◆ callbackShowWebsiteSettingsTabs()

MarkupPlugin::callbackShowWebsiteSettingsTabs (   $hookName,
  $args 
)

Extend the website settings tabs to include markup settings

Parameters
$hookNamestring The name of the invoked hook
$argsarray Hook parameters
Returns
boolean Hook handling status

Definition at line 272 of file MarkupPlugin.inc.php.

References Plugin\$request, and Registry\get().

◆ callbackSubmissionFileDeleted()

MarkupPlugin::callbackSubmissionFileDeleted (   $hookName,
  $params 
)

Remove entries related to a submission file when that file is deleted

Parameters
$hookNamestring The name of the invoked hook
$argsarray Hook parameters

Definition at line 525 of file MarkupPlugin.inc.php.

References DAORegistry\getDAO().

◆ callbackUserProfile()

MarkupPlugin::callbackUserProfile (   $hookName,
  $params 
)

Extend user profile page with a new tab for user specific OTS login credentials

Parameters
$hookNamestring The name of the invoked hook
$argsarray Hook parameters
Returns
boolean Hook handling status

Definition at line 502 of file MarkupPlugin.inc.php.

References Plugin\$request, Plugin\getRequest(), and Plugin\getSetting().

◆ fetchGateway()

MarkupPlugin::fetchGateway (   $fileId,
  $stageId,
  $target 
)

Triggers document conversion process through MarkupGatewayPlugin::fetch()

Parameters
$fileIdint fileId to retrieve converted archive for
$stageint the file stage
$targetstring job target (xml-conversion or galley-generate)
Returns
string job id

Definition at line 428 of file MarkupPlugin.inc.php.

References Plugin\$request, MarkupConversionHelper\createConversionJobInfo(), Plugin\getRequest(), and MarkupConversionHelper\makeAccessToken().

◆ getActions()

MarkupPlugin::getActions (   $request,
  $verb 
)
See also
Plugin::getActions()

Reimplemented from Plugin.

Definition at line 198 of file MarkupPlugin.inc.php.

References Plugin\$request, and Plugin\getEnabled().

◆ getContextSpecificPluginSettingsFile()

MarkupPlugin::getContextSpecificPluginSettingsFile ( )
See also
PKPPlugin::getContextSpecificPluginSettingsFile()
Returns
string

Reimplemented from Plugin.

Definition at line 155 of file MarkupPlugin.inc.php.

References Plugin\getPluginPath().

◆ getCssUrl()

MarkupPlugin::getCssUrl (   $request)

Get plugin CSS URL

Returns
string Public plugin CSS URL

Definition at line 174 of file MarkupPlugin.inc.php.

References Plugin\$request, and Plugin\getPluginPath().

Referenced by register().

◆ getDescription()

MarkupPlugin::getDescription ( )

Get plugin description

Returns
string Plugin description

Reimplemented from Plugin.

Definition at line 88 of file MarkupPlugin.inc.php.

◆ getDisplayName()

MarkupPlugin::getDisplayName ( )

Get plugin display name

Returns
string Plugin display name

Reimplemented from Plugin.

Definition at line 79 of file MarkupPlugin.inc.php.

◆ getFormatList()

MarkupPlugin::getFormatList ( )

Returns list of available formats

Returns
array format list

Definition at line 51 of file MarkupPlugin.inc.php.

References $_formatList.

◆ getInstallSchemaFile()

MarkupPlugin::getInstallSchemaFile ( )

Get the filename of the ADODB schema for this plugin.

Returns
string Full path and filename to schema descriptor.

Reimplemented from Plugin.

Definition at line 191 of file MarkupPlugin.inc.php.

References Plugin\getPluginPath().

◆ getJsPath()

MarkupPlugin::getJsPath ( )

Get plugin JS path

Returns
string Public plugin JS path

Definition at line 164 of file MarkupPlugin.inc.php.

References Core\getBaseDir().

◆ getJsUrl()

MarkupPlugin::getJsUrl (   $request)

Get plugin JS URL

Returns
string Public plugin JS URL

Definition at line 183 of file MarkupPlugin.inc.php.

References Plugin\$request, and Plugin\getPluginPath().

Referenced by register().

◆ getName()

MarkupPlugin::getName ( )

Get the system name of this plugin. The name must be unique within its category.

Returns
string Name of plugin

Reimplemented from LazyLoadPlugin.

Definition at line 70 of file MarkupPlugin.inc.php.

Referenced by callbackLoadCategory().

◆ getOTSLoginParametersForJournal()

MarkupPlugin::getOTSLoginParametersForJournal (   $journalId,
  $user = null 
)

Retrieve OTS login credentials for specific website

Parameters
$journalIdint Journal ID
$userUser
Returns
array

Definition at line 463 of file MarkupPlugin.inc.php.

References MarkupConversionHelper\canUseCredentialsFromConfig(), Plugin\getSetting(), and MarkupConversionHelper\readCredentialsFromConfig().

◆ getXmlConversionStages()

MarkupPlugin::getXmlConversionStages ( )

Returns default list of stages for convert to xml feature

Returns
array Default list of stages for convert to xml feature

Definition at line 60 of file MarkupPlugin.inc.php.

References $_xmlConversionStages.

◆ manage()

MarkupPlugin::manage (   $args,
  $request 
)
See also
Plugin::manage()

Reimplemented from Plugin.

Definition at line 235 of file MarkupPlugin.inc.php.

References Plugin\$request, PKPTemplateManager\getManager(), and PKPLocale\requireComponents().

◆ register()

MarkupPlugin::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.

Parameters
$categoryString Name of category plugin was registered to
$pathString The path the plugin was found in
$mainContextIdinteger 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.
Returns
boolean True iff plugin registered successfully; if false, the plugin will not be executed.

Reimplemented from LazyLoadPlugin.

Definition at line 96 of file MarkupPlugin.inc.php.

References Plugin\$request, getCssUrl(), Plugin\getEnabled(), getJsUrl(), PKPTemplateManager\getManager(), Plugin\getRequest(), HookRegistry\register(), and DAORegistry\registerDAO().

◆ templateFetchCallback()

MarkupPlugin::templateFetchCallback (   $hookName,
  $params 
)

Adds additional links to submission files grid row

Parameters
$hookNamestring The name of the invoked hook
$argsarray Hook parameters

Definition at line 355 of file MarkupPlugin.inc.php.

References Plugin\$request, Plugin\getRequest(), and Plugin\getSetting().

Field Documentation

◆ $_formatList

$formatList MarkupPlugin::$_formatList = array('epub','xml','pdf')
protected

array Default list of wanted formats

Definition at line 38 of file MarkupPlugin.inc.php.

Referenced by getFormatList().

◆ $_xmlConversionStages

$conversionStages MarkupPlugin::$_xmlConversionStages = array(WORKFLOW_STAGE_ID_SUBMISSION,WORKFLOW_STAGE_ID_INTERNAL_REVIEW,WORKFLOW_STAGE_ID_EXTERNAL_REVIEW,WORKFLOW_STAGE_ID_EDITING,WORKFLOW_STAGE_ID_PRODUCTION)
protected

array Default list of stages for convert to xml feature

Definition at line 44 of file MarkupPlugin.inc.php.

Referenced by getXmlConversionStages().


The documentation for this class was generated from the following file: