Source for file messages.php

Documentation is available at messages.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.  * @package     Joomla.Administrator
  14.  * @subpackage  com_messages
  15.  * @since       1.6
  16.  */
  17. {
  18.     /**
  19.      * Configure the Linkbar.
  20.      *
  21.      * @param   string    The name of the active view.
  22.      *
  23.      * @return  void 
  24.      * @since   1.6
  25.      */
  26.     public static function addSubmenu($vName)
  27.     {
  28.         JHtmlSidebar::addEntry(
  29.             JText::_('COM_MESSAGES_ADD'),
  30.             'index.php?option=com_messages&view=message&layout=edit',
  31.             $vName == 'message'
  32.         );
  33.  
  34.         JHtmlSidebar::addEntry(
  35.             JText::_('COM_MESSAGES_READ'),
  36.             'index.php?option=com_messages',
  37.             $vName == 'messages'
  38.         );
  39.     }
  40.  
  41.     /**
  42.      * Gets a list of the actions that can be performed.
  43.      *
  44.      * @return  JObject 
  45.      */
  46.     public static function getActions()
  47.     {
  48.         $user    JFactory::getUser();
  49.         $result    new JObject;
  50.  
  51.         $actions JAccess::getActions('com_messages');
  52.  
  53.         foreach ($actions as $action)
  54.         {
  55.             $result->set($action->name,    $user->authorise($action->name'com_messages'));
  56.         }
  57.  
  58.         return $result;
  59.     }
  60.  
  61.     /**
  62.      * Get a list of filter options for the state of a module.
  63.      *
  64.      * @return  array  An array of JHtmlOption elements.
  65.      */
  66.     public static function getStateOptions()
  67.     {
  68.         // Build the filter options.
  69.         $options    array();
  70.         $options[]    JHtml::_('select.option',    '1',    JText::_('COM_MESSAGES_OPTION_READ'));
  71.         $options[]    JHtml::_('select.option',    '0',    JText::_('COM_MESSAGES_OPTION_UNREAD'));
  72.         $options[]    JHtml::_('select.option',    '-2',    JText::_('JTRASHED'));
  73.         return $options;
  74.     }
  75. }

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