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

Public Member Functions

 _getTasksToRun ()
 
 _parseCrontab ()
 
 callbackLoadHandler ($hookName, $args)
 
 callbackManage ($hookName, $args)
 
 callbackPostInstall ($hookName, $args)
 
 getActions ($request, $actionArgs)
 
 getDescription ()
 
 getDisplayName ()
 
 getInstallSitePluginSettingsFile ()
 
 getName ()
 
 isSitePlugin ()
 
 manage ($args, $request)
 
 register ($category, $path, $mainContextId=null)
 
 shutdownFunction ()
 
- 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 ()
 
 getContextSpecificPluginSettingsFile ()
 
 getCurrentVersion ()
 
 getDirName ()
 
 getEnabled ()
 
 getHideManagement ()
 
 getInstallControlledVocabFiles ()
 
 getInstallDataFile ()
 
 getInstallEmailTemplateDataFile ()
 
 getInstallEmailTemplatesFile ()
 
 getInstallFilterConfigFiles ()
 
 getInstallMigration ()
 
 getInstallSchemaFile ()
 
 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)
 
 smartyPluginUrl ($params, $smarty)
 
 updateSchema ($hookName, $args)
 
 updateSetting ($contextId, $name, $value, $type=null)
 

Data Fields

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

Additional Inherited Members

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

Detailed Description

Removes dependency on 'cron' for scheduled tasks, including possible tasks defined by plugins. See the PKPAcronPlugin::parseCrontab hook implementation.

Definition at line 23 of file PKPAcronPlugin.inc.php.

Member Function Documentation

◆ _getTasksToRun()

PKPAcronPlugin::_getTasksToRun ( )

Get all scheduled tasks that needs to be executed.

Returns
array

Definition at line 335 of file PKPAcronPlugin.inc.php.

References _parseCrontab(), ScheduledTaskHelper\checkFrequency(), DAORegistry\getDAO(), and Plugin\getSetting().

Referenced by callbackLoadHandler(), and shutdownFunction().

◆ _parseCrontab()

PKPAcronPlugin::_parseCrontab ( )

Parse all scheduled tasks files and save the result object in database.

Definition at line 276 of file PKPAcronPlugin.inc.php.

References HookRegistry\call(), fatalError(), ScheduledTaskHelper\getTaskArgs(), PluginRegistry\loadAllPlugins(), and Plugin\updateSetting().

Referenced by _getTasksToRun(), callbackManage(), callbackPostInstall(), and manage().

◆ callbackLoadHandler()

PKPAcronPlugin::callbackLoadHandler (   $hookName,
  $args 
)

Load handler hook to check for tasks to run.

Parameters
$hookNamestring
$argsarray
Returns
boolean
See also
PKPPageRouter::loadHandler() for the hook call.

Definition at line 148 of file PKPAcronPlugin.inc.php.

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

◆ callbackManage()

PKPAcronPlugin::callbackManage (   $hookName,
  $args 
)

Syncronize crontab with lazy load plugins management.

Parameters
$hookNamestring
$argsarray
Returns
boolean
See also
PluginHandler::plugin() for the hook call.

Definition at line 184 of file PKPAcronPlugin.inc.php.

References _parseCrontab(), and HookRegistry\getHooks().

◆ callbackPostInstall()

PKPAcronPlugin::callbackPostInstall (   $hookName,
  $args 
)

Post install hook to flag cron tab reload on every install/upgrade.

Parameters
$hookNamestring
$argsarray
Returns
boolean
See also
Installer::postInstall() for the hook call.

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

References _parseCrontab().

◆ getActions()

PKPAcronPlugin::getActions (   $request,
  $actionArgs 
)

Get a list of link actions for plugin management.

Parameters
requestPKPRequest
$actionArgsarray The list of action args to be included in request URLs.
Returns
array List of LinkActions

Reimplemented from Plugin.

Definition at line 93 of file PKPAcronPlugin.inc.php.

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

◆ getDescription()

PKPAcronPlugin::getDescription ( )

Get a description of this plugin.

Returns
string

Reimplemented from Plugin.

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

◆ getDisplayName()

PKPAcronPlugin::getDisplayName ( )

Get the display name for this plugin.

Returns
string

Reimplemented from Plugin.

Definition at line 72 of file PKPAcronPlugin.inc.php.

◆ getInstallSitePluginSettingsFile()

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

Returns
string

Reimplemented from Plugin.

Definition at line 86 of file PKPAcronPlugin.inc.php.

References Plugin\getPluginPath().

◆ getName()

PKPAcronPlugin::getName ( )

See also
Plugin::getName()

Reimplemented from LazyLoadPlugin.

Definition at line 65 of file PKPAcronPlugin.inc.php.

Referenced by getActions().

◆ isSitePlugin()

PKPAcronPlugin::isSitePlugin ( )

Site-wide plugins should override this function to return true.

Returns
boolean

Reimplemented from Plugin.

Definition at line 57 of file PKPAcronPlugin.inc.php.

◆ manage()

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

Reimplemented from Plugin.

Definition at line 114 of file PKPAcronPlugin.inc.php.

References Plugin\$request, _parseCrontab(), and DAO\getDataChangedEvent().

◆ register()

PKPAcronPlugin::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 40 of file PKPAcronPlugin.inc.php.

References Plugin\addLocaleData(), Config\getVar(), and HookRegistry\register().

◆ shutdownFunction()

PKPAcronPlugin::shutdownFunction ( )

Shutdown callback.

Definition at line 212 of file PKPAcronPlugin.inc.php.

References _getTasksToRun(), and DAORegistry\getDAO().

Field Documentation

◆ $_tasksToRun

$_tasksToRun PKPAcronPlugin::$_tasksToRun

array

Definition at line 35 of file PKPAcronPlugin.inc.php.

◆ $_workingDir

$_workingDir PKPAcronPlugin::$_workingDir

string

Definition at line 29 of file PKPAcronPlugin.inc.php.


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