_applyPostInstallationMessages()
protected method
Applies the post-installation messages for Joomla! 3.2 or later
addPostInstallationMessage()
protected method
The $options array contains the following mandatory keys:
extension_id The numeric ID of the extension this message is for (see the #__extensions table)
type One of message, link or action. Their meaning is:
message Informative message. The user can dismiss it.
link The action button links to a URL. The URL is defined in the action parameter.
action A PHP action takes place when the action button is clicked. You need to specify the
action_file (RAD path to the PHP file) and action (PHP function name) keys. See
below for more information.
title_key The JText language key for the title of this PIM
Example: COM_FOOBAR_POSTINSTALL_MESSAGEONE_TITLE
description_key The JText language key for the main body (description) of this PIM
Example: COM_FOOBAR_POSTINSTALL_MESSAGEONE_DESCRIPTION
action_key The JText language key for the action button. Ignored and not required when type=message
Example: COM_FOOBAR_POSTINSTALL_MESSAGEONE_ACTION
language_extension The extension name which holds the language keys used above. For example, com_foobar,
mod_something, plg_system_whatever, tpl_mytemplate
language_client_id Should we load the front-end (0) or back-end (1) language keys?
version_introduced Which was the version of your extension where this message appeared for the first time?
Example: 3.2.1
enabled Must be 1 for this message to be enabled. If you omit it, it defaults to 1.
condition_file The RAD path to a PHP file containing a PHP function which determines whether this message
should be shown to the user. @see Template::parsePath() for RAD path format. Joomla!
will include this file before calling the condition_method.
Example: admin://components/com_foobar/helpers/postinstall.php
condition_method The name of a PHP function which will be used to determine whether to show this message to
the user. This must be a simple PHP user function (not a class method, static method etc)
which returns true to show the message and false to hide it. This function is defined in the
condition_file.
Example: com_foobar_postinstall_messageone_condition
When type=message no additional keys are required.
When type=link the following additional keys are required:
action The URL which will open when the user clicks on the PIM's action button
Example: index.php?option=com_foobar&view=tools&task=installSampleData
Then type=action the following additional keys are required:
action_file The RAD path to a PHP file containing a PHP function which performs the action of this PIM.
postflight()
public method
Runs after install, update or discover_update. In other words, it executes after Joomla! has finished installing
or updating your component. This is the last chance you've got to perform any additional installations, clean-up,
database updates and similar housekeeping functions.
public postflight ( string $type, JInstallerAdapterComponent $parent ) |
$type |
string |
install, update or discover_update |
$parent |
JInstallerAdapterComponent |
Parent object |
renderPostInstallation()
protected method
Override this method to display a custom component installation message if you so wish
protected renderPostInstallation ( JInstallerAdapterComponent $parent ) |
$parent |
JInstallerAdapterComponent |
Parent class calling us |
renderPostUninstallation()
protected method
Override this method to display a custom component uninstallation message if you so wish
protected renderPostUninstallation ( JInstallerAdapterComponent $parent ) |
$parent |
JInstallerAdapterComponent |
Parent class calling us |
uninstallPostInstallationMessages()
protected method
$postInstallationMessages protected_oe property
This array contains the message definitions for the Post-installation Messages component added in Joomla! 3.2 and
later versions. Each element is also a hashed array. For the keys used in these message definitions please
protected array $postInstallationMessages |
return |
array |
|