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.      * @param   int $value    The state value
  20.      * @param   int $i 
  21.      */
  22.     public static function state($value 0$i$canChange)
  23.     {
  24.         // Array of image, task, title, action.
  25.         $states    array(
  26.             -2    => array('trash.png',        'messages.unpublish',    'JTRASHED',                'COM_MESSAGES_MARK_AS_UNREAD'),
  27.             1    => array('tick.png',        'messages.unpublish',    'COM_MESSAGES_OPTION_READ',        'COM_MESSAGES_MARK_AS_UNREAD'),
  28.             0    => array('publish_x.png',    'messages.publish',        'COM_MESSAGES_OPTION_UNREAD',    'COM_MESSAGES_MARK_AS_READ')
  29.         );
  30.         $state    JArrayHelper::getValue($states(int) $value$states[0]);
  31.         $html    JHtml::_('image''admin/'.$state[0]JText::_($state[2])nulltrue);
  32.         if ($canChange)
  33.         {
  34.             $html '<a href="#" onclick="return listItemTask(\'cb'.$i.'\',\''.$state[1].'\')" title="'.JText::_($state[3]).'">'
  35.                     .$html.'</a>';
  36.         }
  37.  
  38.         return $html;
  39.     }
  40. }

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