Open Monograph Press  3.3.0
PdfJsViewerPlugin Class Reference
Inheritance diagram for PdfJsViewerPlugin:
GenericPlugin LazyLoadPlugin Plugin

Public Member Functions

 downloadCallback ($hookName, $params)
 
 getContextSpecificPluginSettingsFile ()
 
 getDescription ()
 
 getDisplayName ()
 
 register ($category, $path, $mainContextId=null)
 
 viewCallback ($hookName, $args)
 
- Public Member Functions inherited from LazyLoadPlugin
 getCanDisable ()
 
 getCanEnable ()
 
 getCurrentContextId ()
 
 getEnabled ($contextId=null)
 
 getName ()
 
 setEnabled ($enabled)
 
- Public Member Functions inherited from Plugin
 __construct ()
 
 _overridePluginTemplates ($hookName, $args)
 
 addLocaleData ($locale=null)
 
 getActions ($request, $actionArgs)
 
 getCategory ()
 
 getCurrentVersion ()
 
 getDirName ()
 
 getEnabled ()
 
 getHideManagement ()
 
 getInstallControlledVocabFiles ()
 
 getInstallDataFile ()
 
 getInstallEmailTemplateDataFile ()
 
 getInstallEmailTemplatesFile ()
 
 getInstallFilterConfigFiles ()
 
 getInstallMigration ()
 
 getInstallSchemaFile ()
 
 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 ()
 
 manage ($args, $request)
 
 smartyPluginUrl ($params, $smarty)
 
 updateSchema ($hookName, $args)
 
 updateSetting ($contextId, $name, $value, $type=null)
 

Additional Inherited Members

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

Detailed Description

Class for PdfJsViewer plugin.

Definition at line 18 of file PdfJsViewerPlugin.inc.php.

Member Function Documentation

◆ downloadCallback()

PdfJsViewerPlugin::downloadCallback (   $hookName,
  $params 
)

Callback for download function

Parameters
$hookNamestring
$paramsarray
Returns
boolean

Definition at line 97 of file PdfJsViewerPlugin.inc.php.

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

◆ getContextSpecificPluginSettingsFile()

PdfJsViewerPlugin::getContextSpecificPluginSettingsFile ( )

Install default settings on press creation.

Returns
string

Reimplemented from Plugin.

Definition at line 37 of file PdfJsViewerPlugin.inc.php.

References Plugin\getPluginPath().

◆ getDescription()

PdfJsViewerPlugin::getDescription ( )

Get a description of the plugin.

Reimplemented from Plugin.

Definition at line 52 of file PdfJsViewerPlugin.inc.php.

◆ getDisplayName()

PdfJsViewerPlugin::getDisplayName ( )

Get the display name of this plugin.

Returns
String

Reimplemented from Plugin.

Definition at line 45 of file PdfJsViewerPlugin.inc.php.

◆ register()

PdfJsViewerPlugin::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 22 of file PdfJsViewerPlugin.inc.php.

References Plugin\getEnabled(), and HookRegistry\register().

◆ viewCallback()

PdfJsViewerPlugin::viewCallback (   $hookName,
  $args 
)

Callback to view the PDF content rather than downloading.

Parameters
$hookNamestring
$argsarray
Returns
boolean

Definition at line 62 of file PdfJsViewerPlugin.inc.php.

References Plugin\$request, PKPApplication\get(), PKPTemplateManager\getManager(), and Plugin\getTemplateResource().


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