Source for file rules.php

Documentation is available at rules.php

  1. <?php
  2. /**
  3.  * @package    FrameworkOnFramework
  4.  * @subpackage form
  5.  * @copyright  Copyright (C) 2010 - 2012 Akeeba Ltd. All rights reserved.
  6.  * @license    GNU General Public License version 2 or later; see LICENSE.txt
  7.  */
  8. // Protect from unauthorized access
  9. defined('_JEXEC'or die;
  10.  
  11. if (!class_exists('JFormFieldRules'))
  12. {
  13.     require_once JPATH_LIBRARIES '/joomla/form/fields/rules.php';
  14. }
  15.  
  16. /**
  17.  * Form Field class for FOF
  18.  * Joomla! ACL Rules
  19.  *
  20.  * @package  FrameworkOnFramework
  21.  * @since    2.1
  22.  */
  23. class FOFFormFieldRules extends JFormFieldRules implements FOFFormField
  24. {
  25.     protected $static;
  26.  
  27.     protected $repeatable;
  28.     
  29.     /** @var   FOFTable  The item being rendered in a repeatable form field */
  30.     public $item;
  31.     
  32.     /** @var int A monotonically increasing number, denoting the row number in a repeatable view */
  33.     public $rowid;
  34.  
  35.     /**
  36.      * Method to get certain otherwise inaccessible properties from the form field object.
  37.      *
  38.      * @param   string  $name  The property name for which to the the value.
  39.      *
  40.      * @return  mixed  The property value or null.
  41.      *
  42.      * @since   2.0
  43.      */
  44.     public function __get($name)
  45.     {
  46.         switch ($name)
  47.         {
  48.             // This field cannot provide a static display
  49.             case 'static':
  50.                 return '';
  51.                 break;
  52.  
  53.             // This field cannot provide a repeateable display
  54.             case 'repeatable':
  55.                 return '';
  56.                 break;
  57.  
  58.             default:
  59.                 return parent::__get($name);
  60.         }
  61.     }
  62.  
  63.     /**
  64.      * Get the rendering of this field type for static display, e.g. in a single
  65.      * item view (typically a "read" task).
  66.      *
  67.      * @since 2.0
  68.      *
  69.      * @return  string  The field HTML
  70.      */
  71.     public function getStatic()
  72.     {
  73.         return '';
  74.     }
  75.  
  76.     /**
  77.      * Get the rendering of this field type for a repeatable (grid) display,
  78.      * e.g. in a view listing many item (typically a "browse" task)
  79.      *
  80.      * @since 2.1
  81.      *
  82.      * @return  string  The field HTML
  83.      */
  84.     public function getRepeatable()
  85.     {
  86.         return '';
  87.     }
  88. }

Documentation generated on Tue, 19 Nov 2013 15:12:34 +0100 by phpDocumentor 1.4.3