Open Journal Systems  3.3.0
PKPUsageStatsReportPlugin Class Reference
Inheritance diagram for PKPUsageStatsReportPlugin:
ReportPlugin Plugin OJSUsageStatsReportPlugin OMPUsageStatsReportPlugin OPSUsageStatsReportPlugin

Public Member Functions

 display ($args, $request)
 
 getDefaultReportTemplates ($metricTypes=null)
 
 getDescription ()
 
 getDisplayName ()
 
 getMetricDisplayType ($metricType)
 
 getMetricFullName ($metricType)
 
 getMetrics ($metricType=null, $columns=null, $filters=null, $orderBy=null, $range=null)
 
 getName ()
 
 getOptionalColumns ($metricType)
 
 register ($category, $path, $mainContextId=null)
 
- Public Member Functions inherited from ReportPlugin
 getActions ($request, $actionArgs)
 
 getColumns ($metricType)
 
 getMetricTypes ()
 
 getObjectTypes ($metricType)
 
- Public Member Functions inherited from Plugin
 __construct ()
 
 _overridePluginTemplates ($hookName, $args)
 
 addLocaleData ($locale=null)
 
 getCanDisable ()
 
 getCanEnable ()
 
 getCategory ()
 
 getContextSpecificPluginSettingsFile ()
 
 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)
 

Protected Member Functions

 getAggregationColumns ()
 
 isMetricTypeValid ($metricType)
 
- Protected Member Functions inherited from Plugin
 _registerTemplateResource ($inCore=false)
 

Additional Inherited Members

- Data Fields inherited from Plugin
 $pluginCategory
 
 $pluginPath
 
 $request
 

Detailed Description

OJS default statistics report plugin (and metrics provider)

Definition at line 19 of file PKPUsageStatsReportPlugin.inc.php.

Member Function Documentation

◆ display()

PKPUsageStatsReportPlugin::display (   $args,
  $request 
)

◆ getAggregationColumns()

PKPUsageStatsReportPlugin::getAggregationColumns ( )
protected

Get aggregation columns, the ones that can be part of any report template not changing it's main purpose.

Returns
array

Definition at line 149 of file PKPUsageStatsReportPlugin.inc.php.

Referenced by OPSUsageStatsReportPlugin\getDefaultReportTemplates(), OMPUsageStatsReportPlugin\getDefaultReportTemplates(), OJSUsageStatsReportPlugin\getDefaultReportTemplates(), and getDefaultReportTemplates().

◆ getDefaultReportTemplates()

PKPUsageStatsReportPlugin::getDefaultReportTemplates (   $metricTypes = null)

Get the default report templates that each report plugin can implement, with an string to represent it. Subclasses can override this method to add/remove default formats.

Parameters
$metricTypesstring|array|null Define one or more metric types if you don't want to use all the implemented report metric types.
Returns
array

Reimplemented from ReportPlugin.

Reimplemented in OJSUsageStatsReportPlugin, OMPUsageStatsReportPlugin, and OPSUsageStatsReportPlugin.

Definition at line 104 of file PKPUsageStatsReportPlugin.inc.php.

References getAggregationColumns(), Application\getContextAssocType(), ReportPlugin\getMetricTypes(), and isMetricTypeValid().

◆ getDescription()

PKPUsageStatsReportPlugin::getDescription ( )

Get a description of this plugin.

Returns
string

Reimplemented from Plugin.

Definition at line 47 of file PKPUsageStatsReportPlugin.inc.php.

◆ getDisplayName()

PKPUsageStatsReportPlugin::getDisplayName ( )

Get the display name for this plugin.

Returns
string

Reimplemented from Plugin.

Definition at line 40 of file PKPUsageStatsReportPlugin.inc.php.

◆ getMetricDisplayType()

PKPUsageStatsReportPlugin::getMetricDisplayType (   $metricType)

Public metric type that will be displayed to end users.

Parameters
$metricTypestring One of the values returned from getMetricTypes()
Returns
null|string The metric type or null if the plug-in does not support standard metric retrieval or the metric type was not found.

Reimplemented from ReportPlugin.

Reimplemented in OJSUsageStatsReportPlugin, OMPUsageStatsReportPlugin, and OPSUsageStatsReportPlugin.

Definition at line 90 of file PKPUsageStatsReportPlugin.inc.php.

◆ getMetricFullName()

PKPUsageStatsReportPlugin::getMetricFullName (   $metricType)

Full name of the metric type.

Parameters
$metricTypestring One of the values returned from getMetricTypes()
Returns
null|string The full name of the metric type or null if the plug-in does not support standard metric retrieval or the metric type was not found.

Reimplemented from ReportPlugin.

Reimplemented in OJSUsageStatsReportPlugin, OMPUsageStatsReportPlugin, and OPSUsageStatsReportPlugin.

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

◆ getMetrics()

PKPUsageStatsReportPlugin::getMetrics (   $metricType = null,
  $columns = null,
  $filters = null,
  $orderBy = null,
  $range = null 
)

Retrieve a range of aggregate, filtered, ordered metric values, i.e. a statistics report.

See also
https://pkp.sfu.ca/wiki/index.php/OJSdeStatisticsConcept#Input_and_Output_Formats_.28Aggregation.2C_Filters.2C_Metrics_Data.29 for a full specification of the input and output format of this method.
Parameters
$metricTypenull|string|array metrics selection
$columnsstring|array column (aggregation level) selection
$filtersarray report-level filter selection
$orderByarray order criteria
$rangenull|DBResultRange paging specification
Returns
null|array The selected data as a simple tabular result set or null if metrics are not supported by this plug-in, the specified report is invalid or cannot be produced or another error occurred.

Reimplemented from ReportPlugin.

Reimplemented in OJSUsageStatsReportPlugin, OMPUsageStatsReportPlugin, and OPSUsageStatsReportPlugin.

Definition at line 80 of file PKPUsageStatsReportPlugin.inc.php.

References DAORegistry\getDAO().

◆ getName()

PKPUsageStatsReportPlugin::getName ( )

Protected methods (may be overridden by custom plugins) Get the name of this plugin. The name must be unique within its category, and should be suitable for part of a filename (ie short, no spaces, and no dependencies on cases being unique).

Returns
string name of plugin

Reimplemented from Plugin.

Definition at line 33 of file PKPUsageStatsReportPlugin.inc.php.

◆ getOptionalColumns()

PKPUsageStatsReportPlugin::getOptionalColumns (   $metricType)

Get optional columns that are not required for this report to implement the passed metric type.

Parameters
$metricTypestring One of the values returned from getMetricTypes()
Returns
array Return an array with STATISTICS_DIMENSION_... constants.

Reimplemented from ReportPlugin.

Definition at line 131 of file PKPUsageStatsReportPlugin.inc.php.

References isMetricTypeValid().

◆ isMetricTypeValid()

PKPUsageStatsReportPlugin::isMetricTypeValid (   $metricType)
protected

Check the passed metric type against the metric types this plugin implements.

Parameters
$metricTypearray|string
Returns
boolean

Definition at line 163 of file PKPUsageStatsReportPlugin.inc.php.

References ReportPlugin\getMetricTypes().

Referenced by getDefaultReportTemplates(), and getOptionalColumns().

◆ register()

PKPUsageStatsReportPlugin::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 Plugin.

Definition at line 24 of file PKPUsageStatsReportPlugin.inc.php.

References Plugin\addLocaleData().


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