SM-Joomla-Starthilfen:Joomla Plugins

Aus jsm-wiki.diddipoeler.de
Version vom 26. Januar 2014, 09:54 Uhr von Diddipoeler (Diskussion | Beiträge) (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…“)
(Unterschied) ← Nächstältere Version | Aktuelle Version (Unterschied) | Nächstjüngere Version → (Unterschied)
Zur Navigation springen Zur Suche springen

Ereignisse in den Plugins

System plugin 1) onBeforeRender() 2) onAfterRender() 3) onAfterRoute() 4) onAfterDispatch() These events are triggered in 'JAdministrator' class in file 'application.php' at location 'Joomla_base\administrator\includes'. 5) 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. 1) onContentPrepare($context, &$item, &$params, $offset) 2) onContentAfterTitle($context, &$item, &$params, $offset) 3) onContentBeforeDisplay($context, &$item, &$params, $offset) 4) 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'). 5) onContentPrepareForm($form, $data) 6) 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 1) onUserLogin($response, $options) 2) onUserLoginFailure($response) 3) onUserLogout($parameters, $options) 4) onUserLogoutFailure($parameters) These events are triggered in 'JApplication' class in file 'application.php' at location 'Joomla_base\libraries\joomla\application'. 5) onUserBeforeSave($getproperties, $isNew, $properties) 6) onUserAfterSave($getproperties, $isNew, $result, $error) 7) onUserBeforeDelete($getproperties) 8) onUserAfterDelete($getproperties,$result, $error) These events are triggered in 'JUser' class in file 'user.php' at location 'Joomla_base\libraries\joomla\user'.

Authentication plugin 1) 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 2) onUserAuthorisationFailure($authorisation) This event is triggered in 'JApplication' class in file 'application.php' at location 'Joomla_base\libraries\joomla\application'.

Editors plugin 1) onInit() 2) onSave($id) 3) onSetContent($id) 4) onCustomEditorButton (editors-xtd) 5) onDisplay($name, $content, $width, $height, $col, $row, $buttons = true, $id = null, $asset = null, $author = null, $params = array()) 6) onGetContent($id) 7) onGetInsertMethod($name) Search plugin 1) onContentSearch($keyword,$match,$ordering,$areas) 2) 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'. 1) onSubmitContact(&$contact, &$data) - Triggered when passed form Validation. 2) 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');