Source for file message.php

Documentation is available at message.php

  1. <?php
  2. /**
  3.  * @package     Joomla.Administrator
  4.  * @subpackage  com_messages
  5.  *
  6.  * @copyright   Copyright (C) 2005 - 2013 Open Source Matters, Inc. All rights reserved.
  7.  * @license     GNU General Public License version 2 or later; see LICENSE.txt
  8.  */
  9.  
  10. defined('_JEXEC'or die;
  11.  
  12. /**
  13.  * Messages Component Message Model
  14.  *
  15.  * @package     Joomla.Administrator
  16.  * @subpackage  com_messages
  17.  * @since       1.6
  18.  */
  19. {
  20.     /**
  21.      * Method (override) to check if you can save a new or existing record.
  22.      *
  23.      * Adjusts for the primary key name and hands off to the parent class.
  24.      *
  25.      * @param   array  An array of input data.
  26.      * @param   string    The name of the key for the primary key.
  27.      *
  28.      * @return  boolean 
  29.      */
  30.     protected function allowSave($data$key 'message_id')
  31.     {
  32.         return parent::allowSave($data$key);
  33.     }
  34.  
  35.     /**
  36.      * Reply to an existing message.
  37.      *
  38.      * This is a simple redirect to the compose form.
  39.      */
  40.     public function reply()
  41.     {
  42.         if ($replyId $this->input->getInt('reply_id'))
  43.         {
  44.             $this->setRedirect('index.php?option=com_messages&view=message&layout=edit&reply_id=' $replyId);
  45.         }
  46.         else
  47.         {
  48.             $this->setMessage(JText::_('COM_MESSAGES_INVALID_REPLY_ID'));
  49.             $this->setRedirect('index.php?option=com_messages&view=messages');
  50.         }
  51.     }
  52. }

Documentation generated on Tue, 19 Nov 2013 15:08:04 +0100 by phpDocumentor 1.4.3