SM-Joomla-Starthilfen:Joomla Plugins: Unterschied zwischen den Versionen
(Die Seite wurde neu angelegt: „Ereignisse in den Plugins System plugin 1) onBeforeRender() 2) onAfterRender() 3) onAfterRoute() 4) onAfterDispatch() These events are triggered in 'JAdminist…“) |
|||
Zeile 1: | Zeile 1: | ||
=System plugin= | |||
#''' onBeforeRender()''' | |||
#''' onAfterRender()''' | |||
#''' onAfterRoute()''' | |||
#''' onAfterDispatch() | |||
These events are triggered in 'JAdministrator' class in file 'application.php' at location | These events are triggered in 'JAdministrator' class in file 'application.php' at location | ||
'Joomla_base\administrator\includes'. | 'Joomla_base\administrator\includes'.''' | ||
#''' onAfterInitialise() | |||
This event is triggered in 'JApplication' class in file 'application.php' at location | This event is triggered in 'JApplication' class in file 'application.php' at location | ||
'Joomla_base\libraries\joomla\application'. | 'Joomla_base\libraries\joomla\application'.''' | ||
Content plugin | =Content plugin= | ||
content events are triggered during content creation process. | content events are triggered during content creation process. | ||
#''' onContentPrepare($context, &$item, &$params, $offset) | |||
#''' onContentAfterTitle($context, &$item, &$params, $offset) | |||
#''' onContentBeforeDisplay($context, &$item, &$params, $offset) | |||
#''' onContentAfterDisplay($context, &$item, &$params, $offset) | |||
These events are triggered in 'ContentViewArticle' class in file 'view.html.php' at location | These events are triggered in 'ContentViewArticle' class in file 'view.html.php' at location | ||
'Joomla_base\components\com_content\views\article'. | 'Joomla_base\components\com_content\views\article'. | ||
Zeile 25: | Zeile 24: | ||
$offset = It is the integer which determines the 'page' of the content that is to be generated. | $offset = It is the integer which determines the 'page' of the content that is to be generated. | ||
$context - It is the context where this event was triggered(example,'com_content.article'). | $context - It is the context where this event was triggered(example,'com_content.article'). | ||
#''' onContentPrepareForm($form, $data) | |||
#''' onContentPrepareData($context, $data) | |||
These events are triggered in 'ContactModelContact' class in file 'contact.php' at location | These events are triggered in 'ContactModelContact' class in file 'contact.php' at location | ||
'Joomla_base\components\com_contact\models'. | 'Joomla_base\components\com_contact\models'. | ||
Zeile 34: | Zeile 33: | ||
$context - It is the context where this event was triggered(example,'com_users.profile'). | $context - It is the context where this event was triggered(example,'com_users.profile'). | ||
User plugin | =User plugin= | ||
#''' onUserLogin($response, $options) | |||
#''' onUserLoginFailure($response) | |||
#''' onUserLogout($parameters, $options) | |||
#''' onUserLogoutFailure($parameters) | |||
These events are triggered in 'JApplication' class in file 'application.php' at location | These events are triggered in 'JApplication' class in file 'application.php' at location | ||
'Joomla_base\libraries\joomla\application'. | 'Joomla_base\libraries\joomla\application'. | ||
#''' onUserBeforeSave($getproperties, $isNew, $properties) | |||
#''' onUserAfterSave($getproperties, $isNew, $result, $error) | |||
#''' onUserBeforeDelete($getproperties) | |||
#''' onUserAfterDelete($getproperties,$result, $error) | |||
These events are triggered in 'JUser' class in file 'user.php' at location | These events are triggered in 'JUser' class in file 'user.php' at location | ||
'Joomla_base\libraries\joomla\user'. | 'Joomla_base\libraries\joomla\user'. | ||
Authentication plugin | =Authentication plugin= | ||
#''' onUserAuthorisation($response, $options) | |||
This event is triggered in 'JAuthentication' class in file 'authentication.php' at location | This event is triggered in 'JAuthentication' class in file 'authentication.php' at location | ||
'Joomla_base\libraries\joomla\user'. | 'Joomla_base\libraries\joomla\user'. | ||
Zeile 55: | Zeile 54: | ||
$response = response including username of the user to authorise | $response = response including username of the user to authorise | ||
$options = list of options | $options = list of options | ||
#''' onUserAuthorisationFailure($authorisation) | |||
This event is triggered in 'JApplication' class in file 'application.php' at location | This event is triggered in 'JApplication' class in file 'application.php' at location | ||
'Joomla_base\libraries\joomla\application'. | 'Joomla_base\libraries\joomla\application'. | ||
Editors plugin | =Editors plugin= | ||
#''' onInit() | |||
#''' onSave($id) | |||
#''' onSetContent($id) | |||
#''' onCustomEditorButton (editors-xtd) | |||
#''' onDisplay($name, $content, $width, $height, $col, $row, $buttons = true, $id = null, $asset = null, | |||
$author = null, $params = array()) | $author = null, $params = array()) | ||
#''' onGetContent($id) | |||
#''' onGetInsertMethod($name) | |||
Search plugin | |||
=Search plugin= | |||
#''' onContentSearch($keyword,$match,$ordering,$areas) | |||
#''' onContentSearchAreas() | |||
These events are triggered in 'SearchModelSearch' class in file 'search.php' at location | These events are triggered in 'SearchModelSearch' class in file 'search.php' at location | ||
'Joomla_base\components\com_search\models'. | 'Joomla_base\components\com_search\models'. | ||
Contact plugin | =Contact plugin= | ||
These events are triggered during contact form submission. These events are triggered in | These events are triggered during contact form submission. These events are triggered in | ||
'ContactControllerContact' class in file 'contact.php' at location | 'ContactControllerContact' class in file 'contact.php' at location | ||
'Joomla_base\components\com_contact\controllers'. | 'Joomla_base\components\com_contact\controllers'. | ||
#''' onSubmitContact(&$contact, &$data) - Triggered when passed form Validation. | |||
#''' onValidateContact(&$contact, &$data) - Triggered when form Validation succeeded.An example would be validating a captcha. | |||
Where, | Where, | ||
$contact = It is reference to the person submitting contact. | $contact = It is reference to the person submitting contact. | ||
$data = It is reference to the POST variable defined as below. | $data = It is reference to the POST variable defined as below. | ||
$data = JRequest::getVar('jform', array(), 'post', 'array'); | $data = JRequest::getVar('jform', array(), 'post', 'array'); |
Version vom 26. Januar 2014, 10:02 Uhr
System plugin
- onBeforeRender()
- onAfterRender()
- onAfterRoute()
- onAfterDispatch()
These events are triggered in 'JAdministrator' class in file 'application.php' at location 'Joomla_base\administrator\includes'.
- onAfterInitialise()
This event is triggered in 'JApplication' class in file 'application.php' at location 'Joomla_base\libraries\joomla\application'.
Content plugin
content events are triggered during content creation process.
- onContentPrepare($context, &$item, &$params, $offset)
- onContentAfterTitle($context, &$item, &$params, $offset)
- onContentBeforeDisplay($context, &$item, &$params, $offset)
- onContentAfterDisplay($context, &$item, &$params, $offset)
These events are triggered in 'ContentViewArticle' class in file 'view.html.php' at location 'Joomla_base\components\com_content\views\article'. where, $item = It is reference to the article being rendered by the view. $params = It is reference to the array of relevant parameters as determined by the view. $offset = It is the integer which determines the 'page' of the content that is to be generated. $context - It is the context where this event was triggered(example,'com_content.article').
- onContentPrepareForm($form, $data)
- onContentPrepareData($context, $data)
These events are triggered in 'ContactModelContact' class in file 'contact.php' at location 'Joomla_base\components\com_contact\models'. where, $form - It is the JForm Object to be displayed. $data - It is the object containing data for the form . $context - It is the context where this event was triggered(example,'com_users.profile').
User plugin
- onUserLogin($response, $options)
- onUserLoginFailure($response)
- onUserLogout($parameters, $options)
- onUserLogoutFailure($parameters)
These events are triggered in 'JApplication' class in file 'application.php' at location 'Joomla_base\libraries\joomla\application'.
- onUserBeforeSave($getproperties, $isNew, $properties)
- onUserAfterSave($getproperties, $isNew, $result, $error)
- onUserBeforeDelete($getproperties)
- onUserAfterDelete($getproperties,$result, $error)
These events are triggered in 'JUser' class in file 'user.php' at location 'Joomla_base\libraries\joomla\user'.
Authentication plugin
- onUserAuthorisation($response, $options)
This event is triggered in 'JAuthentication' class in file 'authentication.php' at location 'Joomla_base\libraries\joomla\user'. where, $response = response including username of the user to authorise $options = list of options
- onUserAuthorisationFailure($authorisation)
This event is triggered in 'JApplication' class in file 'application.php' at location 'Joomla_base\libraries\joomla\application'.
Editors plugin
- onInit()
- onSave($id)
- onSetContent($id)
- onCustomEditorButton (editors-xtd)
- onDisplay($name, $content, $width, $height, $col, $row, $buttons = true, $id = null, $asset = null,
$author = null, $params = array())
- onGetContent($id)
- onGetInsertMethod($name)
Search plugin
- onContentSearch($keyword,$match,$ordering,$areas)
- onContentSearchAreas()
These events are triggered in 'SearchModelSearch' class in file 'search.php' at location 'Joomla_base\components\com_search\models'.
Contact plugin
These events are triggered during contact form submission. These events are triggered in 'ContactControllerContact' class in file 'contact.php' at location 'Joomla_base\components\com_contact\controllers'.
- onSubmitContact(&$contact, &$data) - Triggered when passed form Validation.
- onValidateContact(&$contact, &$data) - Triggered when form Validation succeeded.An example would be validating a captcha.
Where, $contact = It is reference to the person submitting contact. $data = It is reference to the POST variable defined as below. $data = JRequest::getVar('jform', array(), 'post', 'array');