Extensibility

J!Research has become extensible with plug-ins. This means that events are added to the whole component. This events will be described in this document.

Plugins created for J!Research must be in the group jresearch:

<install version="1.5" type="plugin" group="jresearch">

These plug-ins will be automatically loaded.

This events are added in the version >= 1.1.2.1. Any changes will be reported.

Backend

onAfterRenderJResearchEntityForm

arguments: string $controller, object item

This event will be triggered after rendering the form to edit the specific item. The item is an instance of JResearchPublication, JResearchProject, etc.. depending on the $controller value.

$controller values: cooperation, facility, financier, member, project, publication, thesis, researcharea

onBeforeListJResearchEntities

arguments: string $controller

This event will be triggered before listing J!Research entities of specific controller.

$controller values: cooperations, facilities, financiers, staff, projects, publications, theses, researchareas

onAfterListJResearchEntities

arguments: string $controller

This event will be triggered after listing and rendering J!Research entities.

$controller values: cooperations, facilities, financiers, staff, projects, publications, theses, researchareas

Frontend

onPrepareJResearchContent

arguments: string $controller, object $item

Triggered before a J!Research entity is displayed allowing developers to make modifications in the object which depending on the controller can be an instance of JResearchPublication, JResearchProject, JResearchThesis, etc.

$controller values: cooperation, facility, financier, member, project, publication, thesis

onAfterRenderJResearchEntity

arguments: string $controller, object $item

This event is for the frontend and will be triggered after the rendering of a single item.

$controller values: cooperation, facility, financier, member, project, publication, thesis

onBeforeListFrontendJResearchEntities

arguments: string $controller, string $layout

A frontend event which will be triggered before listing J!Research entities.

$controller values: cooperations, facilities, financiers, staff, projects, publications, theses

$layout values: Layout value from the view. ($this->getLayout())

onAfterListFrontendJResearchEntities

arguments: string $controller, string $layout

A frontend event which will be triggered after listing J!Research entities.

$controller values: cooperations, facilities, financiers, staff, projects, publications, theses

$layout values: Layout value from the view. ($this->getLayout())

Backend and frontend

OnBeforeSaveJResearchEntity

arguments: string $controller, int $itemId

Triggered before a J!Research entity is saved.

$controller values: cooperation, facility, financier, member, project, publication, thesis, researcharea

OnAfterSaveJResearchEntity

arguments: string $controller, object $item

Triggered after a J!Research entity is saved.

$controller values: cooperation, facility, financier, member, project, publication, thesis, researcharea

onBeforeEditJResearchEntity

arguments: string $controller, object $item

This event will be triggered before the form is rendered and ready to edit the specific item.

$controller values: cooperation, facility, financier, member, project, publication, thesis, researcharea

onBeforeExecuteJResearchTask

arguments: none

Triggered before J!Research processes the request based on controller and task specification. Plugin should return true if it intends to handle the request (in that case J!Research will be not responsible of generating a response, the plugin will be in charge of it), false otherwise.

Return: boolean

onAfterExecuteJResearchTask

arguments: none

Triggered after J!Research has processed the request based on controller and task specification but before the controller performs redirection.

Extending publication subtypes

J!Research 1.2.1 and newer offer the possibility of extending the native publication subtypes offered by J!Research without hacking the component. With this feature, users do not have to worry about losing their local changes whenever the component is upgraded.

Since it implies the implementation of several events spread all over the component code, we just provide a sample plugin which installs a new publication subtype in your J!Research. Just consider these suggestions:

1. If you need to reinstall J!Research, please uninstall your publication subtypes plugins first. Once J!Research is properly installed, proceed with the plugins.

2. If you decide to uninstall your publication subtype plugin, it won't remove changes made to your database schema. It has to be done manually.