Joomla CMS  3.10.11 (avec JPlatform 13.1 inclus)
Documentation des API du CMS Joomla en version 3.10.11 et du framework Joomla Platform intégré
Référence de la classe PostinstallModelMessages
+ Graphe d'héritage de PostinstallModelMessages:

Fonctions membres publiques

 buildQuery ($overrideLimits=false)
 
 getExtensionName ($eid)
 
 resetMessages ($eid)
 
 hideMessages ($eid)
 
 getComponentOptions ()
 
 addPostInstallationMessage (array $options)
 
- Fonctions membres publiques hérités de FOFModel
 addBehavior ($name, $config=array())
 
 __construct ($config=array())
 
 setIDsFromRequest ()
 
 setId ($id=0)
 
 getId ()
 
 setIds ($idlist)
 
 getIds ()
 
 reset ()
 
 clearState ()
 
 clearInput ()
 
 setInput ($input)
 
 resetSavedState ()
 
 loadhistory ($version_id, FOFTable &$table, $alias)
 
getItem ($id=null)
 
getList ($overrideLimits=false, $group='')
 
getItemList ($overrideLimits=false, $group='')
 
getIterator ($overrideLimits=false, $tableClass=null)
 
getFirstItem ($overrideLimits=false)
 
 save ($data)
 
 copy ()
 
 getSavedTable ()
 
 delete ()
 
 publish ($publish=1, $user=null)
 
 checkout ()
 
 checkin ()
 
 isCheckedOut ()
 
 hit ()
 
 move ($dirn)
 
 reorder ()
 
 getPagination ()
 
 getTotal ()
 
 getState ($key=null, $default=null, $filter_type='raw')
 
 getHash ()
 
 getTable ($name='', $prefix=null, $options=array())
 
 getReorderWhere ()
 
 buildQuery ($overrideLimits=false)
 
 getTableFields ()
 
 getTableAlias ()
 
 buildCountQuery ()
 
getClone ()
 
 __get ($name)
 
 __set ($name, $value)
 
 __call ($name, $arguments)
 
savestate ($newState)
 
 populateSavestate ($defaultSaveState=-999)
 
 applyAccessFiltering ($userID=null)
 
 getForm ($data=array(), $loadData=true, $source=null)
 
 findFormFilename ($source, $paths=array())
 
 validateForm ($form, $data, $group=null)
 
 onBeforeLoadForm (&$name, &$source, &$options)
 
 onAfterLoadForm (FOFForm &$form, &$name, &$source, &$options)
 
 onBeforePreprocessForm (FOFForm &$form, &$data)
 
 onAfterPreprocessForm (FOFForm &$form, &$data)
 
 getDbo ()
 
 getName ()
 
 setDbo ($db)
 
 setState ($property, $value=null)
 
 setBehaviorParam ($name, $value)
 
 getBehaviorParam ($name, $default=null)
 
 blacklistFilters ($list=null, $reset=false)
 
- Fonctions membres publiques hérités de FOFUtilsObject
 __construct ($properties=null)
 
 __toString ()
 
 def ($property, $default=null)
 
 get ($property, $default=null)
 
 getProperties ($public=true)
 
 getError ($i=null, $toString=true)
 
 getErrors ()
 
 set ($property, $value=null)
 
 setProperties ($properties)
 
 setError ($error)
 

Fonctions membres protégées

 onProcessList (&$resultArray)
 
- Fonctions membres protégées hérités de FOFModel
 _getListCount ($query)
 
 _real_getState ($property=null, $default=null)
 
 getUserStateFromRequest ($key, $request, $default=null, $type='none', $setUserState=true)
 
_getList ($query, $limitstart=0, $limit=0, $group='')
 
_createTable ($name, $prefix='Table', $config=array())
 
 populateState ()
 
 loadForm ($name, $source, $options=array(), $clear=false, $xpath=false)
 
 loadFormData ()
 
 preprocessForm (FOFForm &$form, &$data, $group='content')
 
 onProcessList (&$resultArray)
 
 onAfterGetItem (&$record)
 
 onBeforeSave (&$data, &$table)
 
 onAfterSave (&$table)
 
 onBeforeDelete (&$id, &$table)
 
 onAfterDelete ($id)
 
 onBeforeCopy (&$table)
 
 onAfterCopy (&$table)
 
 onBeforePublish (&$table)
 
 onAfterPublish (&$table)
 
 onBeforeHit (&$table)
 
 onAfterHit (&$table)
 
 onBeforeMove (&$table)
 
 onAfterMove (&$table)
 
 onBeforeReorder (&$table)
 
 onAfterReorder (&$table)
 
 cleanCache ($group=null, $client_id=0)
 

Membres hérités additionnels

- Fonctions membres publiques statiques hérités de FOFModel
static & getAnInstance ($type, $prefix='', $config=array())
 
static & getTmpInstance ($type, $prefix='', $config=array())
 
static addIncludePath ($path='', $prefix='')
 
static addTablePath ($path)
 
- Fonctions membres protégées statiques hérités de FOFModel
static _createFileName ($type, $parts=array())
 
- Attributs protégés hérités de FOFModel
 $__state_set = null
 
 $_db
 
 $event_after_delete = 'onContentAfterDelete'
 
 $event_after_save = 'onContentAfterSave'
 
 $event_before_delete = 'onContentBeforeDelete'
 
 $event_before_save = 'onContentBeforeSave'
 
 $event_change_state = 'onContentChangeState'
 
 $event_clean_cache = null
 
 $id_list = array()
 
 $id = null
 
 $input = array()
 
 $list = null
 
 $name
 
 $option = null
 
 $otable = null
 
 $pagination = null
 
 $record = null
 
 $state
 
 $table = null
 
 $total = null
 
 $_savestate = null
 
 $_forms = array()
 
 $_formData = array()
 
 $configProvider = null
 
 $modelDispatcher = null
 
 $default_behaviors = array('filters')
 
 $_behaviorParams = array()
 
- Attributs protégés hérités de FOFUtilsObject
 $_errors = array()
 

Description détaillée

Model class to manage postinstall messages

Depuis
3.2

Documentation des fonctions membres

◆ addPostInstallationMessage()

addPostInstallationMessage ( array  $options)

Adds or updates a post-installation message (PIM) definition. You can use this in your post-installation script using this code:

require_once JPATH_LIBRARIES . '/fof/include.php'; FOFModel::getTmpInstance('Messages', 'PostinstallModel')->addPostInstallationMessage($options);

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 frontend (0) or backend (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.

Voir également
FOFTemplateUtils::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

When 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.

Voir également
FOFTemplateUtils::parsePath() for RAD path format. Joomla! will include this file before calling the function defined in the action key below. Example: admin://components/com_foobar/helpers/postinstall.php

action The name of a PHP function which will be used to run the action of this PIM. This must be a simple PHP user function (not a class method, static method etc) which returns no result. Example: com_foobar_postinstall_messageone_action

Paramètres
array$optionsSee description
Renvoie
$this
Exceptions
Exception

Références $db, $key, $options, $query, et FOFTemplateUtils\parsePath().

◆ buildQuery()

buildQuery (   $overrideLimits = false)

Builds the SELECT query

Paramètres
boolean$overrideLimitsAre we requested to override the set limits?
Renvoie
JDatabaseQuery
Depuis
3.2

Références $db, $published, et $query.

◆ getComponentOptions()

getComponentOptions ( )

Get the dropdown options for the list of component with post-installation messages

Depuis
3.4
Renvoie
array Compatible with JHtmlSelect::genericList

Références $db, $options, $query, JPATH_SITE, et null.

◆ getExtensionName()

getExtensionName (   $eid)

Returns the name of an extension, as registered in the #__extensions table

Paramètres
integer$eidThe extension ID
Renvoie
string The extension name
Depuis
3.2

Références $basePath, $db, $extension, $lang, $query, JPATH_ADMINISTRATOR, et JPATH_SITE.

◆ hideMessages()

hideMessages (   $eid)

Hides all messages for an extension

Paramètres
integer$eidThe extension ID whose messages we'll hide
Renvoie
mixed False if we fail, a db cursor otherwise
Depuis
3.8.7

Références $db, et $query.

◆ onProcessList()

onProcessList ( $resultArray)
protected

List post-processing. This is used to run the programmatic display conditions against each list item and decide if we have to show it or not.

Do note that this a core method of the RAD Layer which operates directly on the list it's being fed. A little touch of modern magic.

Paramètres
array&$resultArrayA list of items to process
Renvoie
void
Depuis
3.2

Références $file, $hash, $item, $key, jimport(), JPATH_ADMINISTRATOR, JPATH_SITE, et FOFTemplateUtils\parsePath().

◆ resetMessages()

resetMessages (   $eid)

Resets all messages for an extension

Paramètres
integer$eidThe extension ID whose messages we'll reset
Renvoie
mixed False if we fail, a db cursor otherwise
Depuis
3.2

Références $db, et $query.


La documentation de cette classe a été générée à partir du fichier suivant :