Open Journal Systems
3.3.0
|
Protected Member Functions | |
buildUsageEvent ($hookName, $args) | |
getDownloadFinishedEventHooks () | |
getEventHooks () | |
getHtmlPageAssocTypes () | |
getUsageEventData ($hookName, $hookArgs, $request, $router, $templateMgr, $context) | |
isPubIdObjectType ($pubObject) | |
Protected Member Functions inherited from Plugin | |
_registerTemplateResource ($inCore=false) | |
Additional Inherited Members | |
Data Fields inherited from Plugin | |
$pluginCategory | |
$pluginPath | |
$request | |
Base class for usage event plugin. Provide usage events to other statistics plugins.
Definition at line 24 of file PKPUsageEventPlugin.inc.php.
|
protected |
Build an usage event.
$hookName | string |
$args | array |
Definition at line 149 of file PKPUsageEventPlugin.inc.php.
References $application, Plugin\$request, PKPApplication\get(), Config\getContextBaseUrls(), Core\getCurrentDate(), DAORegistry\getDAO(), getDownloadFinishedEventHooks(), getHtmlPageAssocTypes(), getUniqueSiteId(), getUsageEventData(), Config\getVar(), isPubIdObjectType(), PluginRegistry\loadCategory(), and Plugin\updateSetting().
Referenced by getUsageEvent().
PKPUsageEventPlugin::getDescription | ( | ) |
Get a description of this plugin.
Reimplemented from Plugin.
Definition at line 69 of file PKPUsageEventPlugin.inc.php.
PKPUsageEventPlugin::getDisplayName | ( | ) |
Get the display name for this plugin.
Reimplemented from Plugin.
Definition at line 62 of file PKPUsageEventPlugin.inc.php.
|
protected |
Get all hooks that define the finished file download.
Reimplemented in UsageEventPlugin.
Definition at line 137 of file PKPUsageEventPlugin.inc.php.
Referenced by buildUsageEvent().
PKPUsageEventPlugin::getEnabled | ( | $contextId = null | ) |
Determine whether the plugin is enabled.
Reimplemented from LazyLoadPlugin.
Definition at line 76 of file PKPUsageEventPlugin.inc.php.
|
protected |
Get all hooks that must be used to generate usage events.
Reimplemented in UsageEventPlugin.
Definition at line 125 of file PKPUsageEventPlugin.inc.php.
Referenced by register().
|
abstractprotected |
Get all assoc types that have their usage event produced by html page access.
Reimplemented in UsageEventPlugin.
Referenced by buildUsageEvent().
PKPUsageEventPlugin::getInstallSitePluginSettingsFile | ( | ) |
Get the filename of the settings data for this plugin to install when the system is installed (i.e. site-level plugin settings). Subclasses using default settings should override this.
Reimplemented from Plugin.
Definition at line 55 of file PKPUsageEventPlugin.inc.php.
References Plugin\getPluginPath().
PKPUsageEventPlugin::getName | ( | ) |
Reimplemented from LazyLoadPlugin.
Definition at line 48 of file PKPUsageEventPlugin.inc.php.
PKPUsageEventPlugin::getUniqueSiteId | ( | ) |
Get the unique site id.
Definition at line 95 of file PKPUsageEventPlugin.inc.php.
References Plugin\getSetting().
Referenced by buildUsageEvent().
PKPUsageEventPlugin::getUsageEvent | ( | $hookName, | |
$args | |||
) |
Get usage event and pass it to the registered plugins, if any.
Definition at line 106 of file PKPUsageEventPlugin.inc.php.
References buildUsageEvent(), HookRegistry\call(), and HookRegistry\getHooks().
|
protected |
Get usage event details based on the passed hook. Subclasses should extend to implement application specifics.
$hookName | string |
$hookArgs | array |
$request | PKPRequest |
$router | PageRouter |
$templateMgr | PKPTemplateManager |
$context | Context |
Reimplemented in UsageEventPlugin.
Definition at line 342 of file PKPUsageEventPlugin.inc.php.
References $op, Plugin\$request, and Application\getContextAssocType().
Referenced by buildUsageEvent().
|
abstractprotected |
Whether or not the passed object is of a type that can have different public identifiers, like DOI, URN, etc.
$pubObject | DataObject |
Reimplemented in UsageEventPlugin.
Referenced by buildUsageEvent().
PKPUsageEventPlugin::isSitePlugin | ( | ) |
Site-wide plugins should override this function to return true.
Reimplemented from Plugin.
Definition at line 83 of file PKPUsageEventPlugin.inc.php.
PKPUsageEventPlugin::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 32 of file PKPUsageEventPlugin.inc.php.
References getEventHooks(), and HookRegistry\register().