Open Journal Systems
3.3.0
|
Static Public Member Functions | |
static | _instantiatePlugin ($category, $categoryDir, $file, $classToCheck=null) |
static | getAllPlugins () |
static | getCategories () |
static | getPlugin ($category, $name) |
static & | getPlugins ($category=null) |
static | loadAllPlugins ($enabledOnly=false) |
static | loadCategory ($category, $enabledOnly=false, $mainContextId=null) |
static | loadPlugin ($category, $pathName, $mainContextId=null) |
static | register ($category, $plugin, $path, $mainContextId=null) |
Registry class for managing plugins.
Definition at line 19 of file PluginRegistry.inc.php.
|
static |
Instantiate a plugin.
This method can be called statically.
$category | string |
$categoryDir | string |
$file | string |
$classToCheck | string set null to maintain pre-2.3.x backwards compatibility |
Definition at line 231 of file PluginRegistry.inc.php.
References instantiate().
Referenced by loadCategory().
|
static |
Get all plugins in a single array.
Definition at line 43 of file PluginRegistry.inc.php.
References getPlugins().
Referenced by loadAllPlugins().
|
static |
Get a list of the various plugin categories available.
NB: The categories are returned in the order in which they have to be registered and/or installed. Plug-ins in categories later in the list may depend on plug-ins in earlier categories.
Definition at line 196 of file PluginRegistry.inc.php.
References $application, HookRegistry\call(), and PKPApplication\get().
Referenced by Installer\addPluginVersions(), PluginGridHandler\deletePlugin(), PKPLocale\installLocale(), PluginGridHandler\loadData(), and PluginGalleryGridHandler\renderFilter().
|
static |
Get a plugin by name.
$category | String category name |
$name | String plugin name |
Definition at line 85 of file PluginRegistry.inc.php.
References getPlugins().
Referenced by SwordHandler\__construct(), SwordSettingsTabHandler\__construct(), MarkupBatchConversionHandler\__construct(), MarkupHandler\__construct(), PLNStatusGridHandler\__construct(), TextureHandler\__construct(), Depositor\__construct(), CustomBlockGridHandler\__construct(), MarkupSettingsTabHandler\__construct(), DataciteInfoSender\__construct(), MedraInfoSender\__construct(), CrossrefInfoSender\__construct(), DOAJInfoSender\__construct(), CopyAccessLogFileTool\__construct(), MarkupBatchGatewayPlugin\__construct(), UsageStatsLoader\__construct(), MarkupGatewayPlugin\__construct(), UsageStatsHandler\_getPlugin(), PLNHandler\_getPlugin(), OrcidHandler\about(), OrcidProfilePlugin\buildOrcidWork(), SettingsHandler\distribution(), CitationStyleLanguageHandler\download(), importExport\execute(), InstallPluginVersionTool\execute(), UploadPluginForm\execute(), CustomBlockForm\execute(), DepositPackage\generateAtomDocument(), DepositPackage\generatePackage(), CitationStyleLanguageHandler\get(), PKPStatisticsHelper\getGeoLocationTool(), PLNGatewayPlugin\getPLNPlugin(), PKPToolsHandler\importexport(), OrcidHandler\orcidAuthorize(), OrcidHandler\orcidVerify(), ThemePlugin\setParent(), PLNHandler\status(), OAIMetadataFormat_MARC21\toXml(), OAIMetadataFormat_MARC\toXml(), DepositPackage\transferDeposit(), DepositPackage\updateDepositStatus(), and BrowseBySectionHandler\view().
|
static |
Return all plugins in the given category as an array, or, if the category is not specified, all plugins in an associative array of arrays by category.
$category | String the name of the category to retrieve |
Definition at line 30 of file PluginRegistry.inc.php.
References Registry\get().
Referenced by Installer\addPluginVersions(), IssueGridHandler\editIssue(), MetadataPluginTestCase\executeMetadataPluginTest(), NavigationMenuForm\fetch(), getAllPlugins(), PKPTemplateManager\getManager(), getPlugin(), PKPToolsHandler\importexport(), PKPWorkflowHandler\index(), PKPTemplateManager\initialize(), loadCategory(), register(), and PKPTemplateManager\smartyLoadNavigationMenuArea().
|
static |
Load all plugins in the system and return them in a single array.
$enabledOnly | boolean load only enabled plug-ins |
Definition at line 208 of file PluginRegistry.inc.php.
References getAllPlugins(), and loadCategory().
Referenced by Installer\__construct(), PKPAcronPlugin\_parseCrontab(), and PKP\Services\PKPContextService\add().
|
static |
Load all plugins for a given category.
$category | string The name of the category to load |
$enabledOnly | boolean if true load only enabled plug-ins (db-installation required), otherwise look on disk and load all available plug-ins (no db required). |
$mainContextId | integer To identify enabled plug-ins 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. |
Definition at line 103 of file PluginRegistry.inc.php.
References $application, _instantiatePlugin(), HookRegistry\call(), PKPApplication\get(), getPlugins(), Config\getVar(), and register().
Referenced by AuthSourceDAO\__construct(), GatewayHandler\__construct(), Depositor\__construct(), CrossrefInfoSender\__construct(), DOAJInfoSender\__construct(), DataciteInfoSender\__construct(), MedraInfoSender\__construct(), PKP\components\forms\context\PKPPaymentSettingsForm\__construct(), PKP\components\forms\site\PKPSiteAppearanceForm\__construct(), PKP\components\forms\context\PKPAppearanceSetupForm\__construct(), PKP\components\forms\context\PKPThemeForm\__construct(), CommandLineTool\__construct(), MedraSettingsForm\__construct(), UsageStatsLoader\__construct(), DataciteSettingsForm\__construct(), CrossRefSettingsForm\__construct(), CrossrefInfoSender\_getJournals(), MedraInfoSender\_getJournals(), DataciteInfoSender\_getJournals(), CitationStyleLanguageHandler\_setupRequest(), PKPPublicationNativeXmlFilter\addIdentifiers(), RepresentationNativeXmlFilter\addIdentifiers(), IssueNativeXmlFilter\addIdentifiers(), SubmissionFileNativeXmlFilter\addIdentifiers(), PKPPubIdPluginHelper\addJavaScripts(), Installer\addPluginVersions(), PKPPubIdPluginHelper\assignPubId(), OrcidProfilePlugin\buildOrcidWork(), PKPUsageEventPlugin\buildUsageEvent(), PublicIdentifiersForm\clearIssueObjectsPubIds(), PKPPubIdPluginHelper\clearPubId(), PageHandler\css(), IssueHandler\current(), Dispatcher\dispatch(), DOIPubIdExportPlugin\display(), PKPTemplateManager\displaySidebar(), PKPBackendPaymentsSettingsHandler\edit(), ArticleGalleyGridHandler\editGalley(), PKPSiteHandler\editTheme(), PKPContextHandler\editTheme(), PluginRequiredPolicy\effect(), importExport\execute(), PKPPubIdPluginHelper\execute(), MedraInfoSender\executeActions(), CrossrefInfoSender\executeActions(), DataciteInfoSender\executeActions(), CrossRefExportPlugin\executeCLICommand(), Dc11SchemaArticleAdapter\extractMetadataFromDataObject(), NavigationMenuForm\fetch(), PKPAssignPublicIdentifiersForm\fetch(), PKPPublicIdentifiersForm\fetch(), DepositPackage\generatePackage(), PKPStatisticsHelper\getAllMetricTypeStrings(), PKP\Services\PKPSubmissionService\getBackendListProperties(), PKPTemplateManager\getManager(), PKPApplication\getMetrics(), Journal\getMetricTypes(), Context\getMetricTypes(), PKPApplication\getMetricTypes(), OJSPaymentManager\getPaymentPlugin(), APP\Services\IssueService\getProperties(), PKPStatisticsHelper\getReportPluginByMetricType(), PKPSiteHandler\getTheme(), PKPContextHandler\getTheme(), PKPToolsHandler\importexport(), OAIHandler\index(), PKPPubIdPluginHelper\init(), PKPLocale\installLocale(), loadAllPlugins(), PluginGridHandler\loadCategoryData(), Installer\migrateSidebarBlocks(), NativeXmlRepresentationFilter\parseIdentifier(), NativeXmlIssueFilter\parseIdentifier(), NativeXmlPKPPublicationFilter\parseIdentifier(), NativeXmlSubmissionFileFilter\parseIdentifier(), PaymentHandler\plugin(), PKPPubIdPluginHelper\readAssignInputData(), PKPPubIdPluginHelper\readInputData(), PKPToolsHandler\report(), PKPPubIdPluginHelper\setLinkActions(), PKPTemplateManager\smartyLoadNavigationMenuArea(), PKPToolsHandler\statistics(), PKPPubIdPluginHelper\validate(), IssueHandler\view(), and ArticleHandler\view().
|
static |
Load a specific plugin from a category by path name. Similar to loadCategory, except that it only loads a single plugin within a category rather than loading all.
$category | string |
$pathName | string |
$mainContextId | integer To identify enabled plug-ins 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. |
Definition at line 175 of file PluginRegistry.inc.php.
References register().
Referenced by ExportPublishedSubmissionsListGridHandler\initialize(), PubIdExportRepresentationsListGridHandler\initialize(), and PubIdExportIssuesListGridHandler\initialize().
|
static |
Register a plugin with the registry in the given category.
$category | String the name of the category to extend |
$plugin | The instantiated plugin to add |
$path | The path the plugin was found in |
$mainContextId | integer To identify enabled plug-ins 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. |
Definition at line 64 of file PluginRegistry.inc.php.
References getPlugins().
Referenced by InstallPluginVersionTool\execute(), loadCategory(), loadPlugin(), AnnouncementFeedPlugin\register(), CustomBlockManagerPlugin\register(), WebFeedPlugin\register(), and UsageStatsPlugin\register().