[ Index ]

PHP Cross Reference of Joomla 4.2.2 documentation

title

Body

[close]

/administrator/components/com_messages/src/Model/ -> MessageModel.php (summary)

(no description)

Copyright: (C) 2008 Open Source Matters, Inc.
License: GNU General Public License version 2 or later; see LICENSE.txt
File Size: 501 lines (16 kb)
Included or required:0 times
Referenced: 0 times
Includes or requires: 0 files

Defines 1 class

MessageModel:: (8 methods):
  populateState()
  delete()
  getItem()
  getForm()
  loadFormData()
  publish()
  save()
  notifySuperUsers()


Class: MessageModel  - X-Ref

Private Message model.

populateState()   X-Ref
Method to auto-populate the model state.

This method should only be called once per instantiation and is designed
to be called on the first call to the getState() method unless the model
configuration flag to ignore the request is set.

Note. Calling getState in this method will result in recursion.

return: void

delete(&$pks)   X-Ref
Check that recipient user is the one trying to delete and then call parent delete method

param: array  &$pks  An array of record primary keys.
return: boolean  True if successful, false if an error occurs.

getItem($pk = null)   X-Ref
Method to get a single record.

param: integer  $pk  The id of the primary key.
return: mixed    Object on success, false on failure.

getForm($data = array()   X-Ref
Method to get the record form.

param: array    $data      Data for the form.
param: boolean  $loadData  True if the form is to load its own data (default case), false if not.
return: \Joomla\CMS\Form\Form|bool  A Form object on success, false on failure

loadFormData()   X-Ref
Method to get the data that should be injected in the form.

return: mixed  The data for the form.

publish(&$pks, $value = 1)   X-Ref
Checks that the current user matches the message recipient and calls the parent publish method

param: array    &$pks   A list of the primary keys to change.
param: integer  $value  The value of the published state.
return: boolean  True on success.

save($data)   X-Ref
Method to save the form data.

param: array  $data  The form data.
return: boolean  True on success.

notifySuperUsers($subject, $message, $fromUser = null)   X-Ref
Sends a message to the site's super users

param: string  $subject  The message subject
param: string  $message  The message
return: boolean



Generated: Wed Sep 7 05:41:13 2022 Chilli.vc Blog - For Webmaster,Blog-Writer,System Admin and Domainer