Source for file imagelist.php

Documentation is available at imagelist.php

  1. <?php
  2. /**
  3.  * @package     Joomla.Platform
  4.  * @subpackage  Form
  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
  8.  */
  9.  
  10. defined('JPATH_PLATFORM'or die;
  11.  
  12.  
  13. /**
  14.  * Supports an HTML select list of image
  15.  *
  16.  * @package     Joomla.Platform
  17.  * @subpackage  Form
  18.  * @since       11.1
  19.  */
  20. {
  21.     /**
  22.      * The form field type.
  23.      *
  24.      * @var    string 
  25.      * @since  11.1
  26.      */
  27.     protected $type = 'ImageList';
  28.  
  29.     /**
  30.      * Method to get the list of images field options.
  31.      * Use the filter attribute to specify allowable file extensions.
  32.      *
  33.      * @return  array  The field option objects.
  34.      *
  35.      * @since   11.1
  36.      */
  37.     protected function getOptions()
  38.     {
  39.         // Define the image file type filter.
  40.         $filter '\.png$|\.gif$|\.jpg$|\.bmp$|\.ico$|\.jpeg$|\.psd$|\.eps$';
  41.  
  42.         // Set the form field element attribute for file type filter.
  43.         $this->element->addAttribute('filter'$filter);
  44.  
  45.         // Get the field options.
  46.         return parent::getOptions();
  47.     }
  48. }

Documentation generated on Tue, 19 Nov 2013 15:05:18 +0100 by phpDocumentor 1.4.3