[ Index ]

PHP Cross Reference of Joomla 4.2.2 documentation

title

Body

[close]

/libraries/src/Form/ -> FormFilterInterface.php (source)

   1  <?php
   2  
   3  /**
   4   * Joomla! Content Management System
   5   *
   6   * @copyright  (C) 2019 Open Source Matters, Inc. <https://www.joomla.org>
   7   * @license    GNU General Public License version 2 or later; see LICENSE.txt
   8   */
   9  
  10  namespace Joomla\CMS\Form;
  11  
  12  use Joomla\Registry\Registry;
  13  
  14  // phpcs:disable PSR1.Files.SideEffects
  15  \defined('_JEXEC') or die;
  16  // phpcs:enable PSR1.Files.SideEffects
  17  
  18  /**
  19   * Interface for a filter class.
  20   *
  21   * @since  4.0.0
  22   */
  23  interface FormFilterInterface
  24  {
  25      /**
  26       * Method to filter a field value.
  27       *
  28       * @param   \SimpleXMLElement  $element  The SimpleXMLElement object representing the `<field>` tag for the form field object.
  29       * @param   mixed              $value    The form field value to validate.
  30       * @param   string             $group    The field name group control value. This acts as an array container for the field.
  31       *                                       For example if the field has name="foo" and the group value is set to "bar" then the
  32       *                                       full field name would end up being "bar[foo]".
  33       * @param   Registry           $input    An optional Registry object with the entire data set to validate against the entire form.
  34       * @param   Form               $form     The form object for which the field is being tested.
  35       *
  36       * @return  mixed   The filtered value.
  37       *
  38       * @since   4.0.0
  39       */
  40      public function filter(\SimpleXMLElement $element, $value, $group = null, Registry $input = null, Form $form = null);
  41  }


Generated: Wed Sep 7 05:41:13 2022 Chilli.vc Blog - For Webmaster,Blog-Writer,System Admin and Domainer