Source for file directory.php

Documentation is available at directory.php

  1. <?php
  2. /**
  3.  * @package     Joomla.Administrator
  4.  * @subpackage  com_admin
  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.  * Utility class working with directory
  14.  *
  15.  * @package     Joomla.Administrator
  16.  * @subpackage  com_admin
  17.  * @since       1.6
  18.  */
  19. abstract class JHtmlDirectory
  20. {
  21.     /**
  22.      * Method to generate a (un)writable message for directory
  23.      *
  24.      * @param   boolean  $writable  is the directory writable?
  25.      *
  26.      * @return  string    html code
  27.      */
  28.     public static function writable($writable)
  29.     {
  30.         if ($writable)
  31.         {
  32.             return '<span class="badge badge-success">' JText::_('COM_ADMIN_WRITABLE''</span>';
  33.         }
  34.         else
  35.         {
  36.             return '<span class="badge badge-important">' JText::_('COM_ADMIN_UNWRITABLE''</span>';
  37.         }
  38.     }
  39.  
  40.     /**
  41.      * Method to generate a message for a directory
  42.      *
  43.      * @param   string   $dir      the directory
  44.      * @param   boolean  $message  the message
  45.      * @param   boolean  $visible  is the $dir visible?
  46.      *
  47.      * @return  string    html code
  48.      */
  49.     public static function message($dir$message$visible=true)
  50.     {
  51.         if ($visible)
  52.         {
  53.             $output $dir;
  54.         }
  55.         else
  56.         {
  57.             $output '';
  58.         }
  59.  
  60.         if (empty($message))
  61.         {
  62.             return $output;
  63.         }
  64.         else
  65.         {
  66.             return $output ' <strong>' JText::_($message'</strong>';
  67.         }
  68.     }
  69. }

Documentation generated on Tue, 19 Nov 2013 15:01:29 +0100 by phpDocumentor 1.4.3