Back to Joomla project (class list)

Class FormHelper - list of methods

Form's helper class.
Provides a storage for filesystem's paths where Form's entities reside and methods for creating those entities. Also stores objects with entities' prototypes for further reusing.
Package: Joomla\CMS\Form
Copyright: (C) 2010 Open Source Matters, Inc.
License: GNU General Public License version 2 or later; see LICENSE.txt
Located at: Joomla/Form/FormHelper.php
Project: Joomla

Method Summary

public static \Joomla\CMS\Form\FormField|bool
(mixed $type, mixed $new = true)

Method to load a form field object given a type.
Parameters
  • string $type The field type.
  • bool $new Flag to toggle whether we should get a new instance of the object.
Returns
  • \Joomla\CMS\Form\FormField|bool FormField object on success, false otherwise.
Since
  • 1.7.0
Show source code of this method: loadFieldType Source Code

public static \Joomla\CMS\Form\FormRule|bool
(mixed $type, mixed $new = true)

Method to load a form rule object given a type.
Parameters
  • string $type The rule type.
  • bool $new Flag to toggle whether we should get a new instance of the object.
Returns
  • \Joomla\CMS\Form\FormRule|bool FormRule object on success, false otherwise.
Since
  • 1.7.0
Show source code of this method: loadRuleType Source Code

public static \Joomla\CMS\Form\FormFilterInterface|bool
(mixed $type, mixed $new = true)

Method to load a form filter object given a type.
Parameters
  • string $type The rule type.
  • bool $new Flag to toggle whether we should get a new instance of the object.
Returns
  • \Joomla\CMS\Form\FormFilterInterface|bool FormRule object on success, false otherwise.
Since
  • 4.0.0
Show source code of this method: loadFilterType Source Code

protected static mixed
(mixed $entity, mixed $type, mixed $new = true)

Method to load a form entity object given a type.
Parameters
  • string $entity The entity.
  • string $type The entity type.
  • bool $new Flag to toggle whether we should get a new instance of the object.
Returns
  • mixed Entity object on success, false otherwise.
Since
  • 1.7.0
Show source code of this method: loadType Source Code

public static string|bool
(mixed $type)

Attempt to import the FormField class file if it isn't already imported.
Parameters
  • string $type Type of a field whose class should be loaded.
Returns
  • string|bool Class name on success or false otherwise.
Since
  • 1.7.0
Show source code of this method: loadFieldClass Source Code

public static string|bool
(mixed $type)

Attempt to import the FormRule class file if it isn't already imported.
Parameters
  • string $type Type of a rule whose class should be loaded.
Returns
  • string|bool Class name on success or false otherwise.
Since
  • 1.7.0
Show source code of this method: loadRuleClass Source Code

public static string|bool
(mixed $type)

Attempt to import the FormFilter class file if it isn't already imported.
Parameters
  • string $type Type of a filter whose class should be loaded.
Returns
  • string|bool Class name on success or false otherwise.
Since
  • 4.0.0
Show source code of this method: loadFilterClass Source Code

protected static string|bool
(mixed $entity, mixed $type)

Load a class for one of the form's entities of a particular type.
Parameters
  • string $entity One of the form entities (field or rule).
  • string $type Type of an entity.
Returns
  • string|bool Class name on success or false otherwise.
Since
  • 1.7.0
Show source code of this method: loadClass Source Code

public static array
(mixed $new = null)

Method to add a path to the list of field include paths.
Parameters
  • mixed $new A path or array of paths to add.
Returns
  • array The list of paths that have been added.
Since
  • 1.7.0
Show source code of this method: addFieldPath Source Code

public static array
(mixed $new = null)

Method to add a path to the list of form include paths.
Parameters
  • mixed $new A path or array of paths to add.
Returns
  • array The list of paths that have been added.
Since
  • 1.7.0
Show source code of this method: addFormPath Source Code

public static array
(mixed $new = null)

Method to add a path to the list of rule include paths.
Parameters
  • mixed $new A path or array of paths to add.
Returns
  • array The list of paths that have been added.
Since
  • 1.7.0
Show source code of this method: addRulePath Source Code

public static array
(mixed $new = null)

Method to add a path to the list of filter include paths.
Parameters
  • mixed $new A path or array of paths to add.
Returns
  • array The list of paths that have been added.
Since
  • 4.0.0
Show source code of this method: addFilterPath Source Code

protected static array
(mixed $entity, mixed $new = null)

Method to add a path to the list of include paths for one of the form's entities.
Parameters
  • string $entity Form's entity name for which paths will be added.
  • mixed $new A path or array of paths to add.
Returns
  • array The list of paths that have been added.
Since
  • 1.7.0
Show source code of this method: addPath Source Code

public static array
(mixed $new = null)

Method to add a namespace prefix to the list of field lookups.
Parameters
  • mixed $new A namespaces or array of namespaces to add.
Returns
  • array The list of namespaces that have been added.
Since
  • 3.8.0
Show source code of this method: addFieldPrefix Source Code

public static array
(mixed $new = null)

Method to add a namespace to the list of form lookups.
Parameters
  • mixed $new A namespace or array of namespaces to add.
Returns
  • array The list of namespaces that have been added.
Since
  • 3.8.0
Show source code of this method: addFormPrefix Source Code

public static array
(mixed $new = null)

Method to add a namespace to the list of rule lookups.
Parameters
  • mixed $new A namespace or array of namespaces to add.
Returns
  • array The list of namespaces that have been added.
Since
  • 3.8.0
Show source code of this method: addRulePrefix Source Code

public static array
(mixed $new = null)

Method to add a namespace to the list of filter lookups.
Parameters
  • mixed $new A namespace or array of namespaces to add.
Returns
  • array The list of namespaces that have been added.
Since
  • 4.0.0
Show source code of this method: addFilterPrefix Source Code

protected static array
(mixed $entity, mixed $new = null)

Method to add a namespace to the list of namespaces for one of the form's entities.
Parameters
  • string $entity Form's entity name for which paths will be added.
  • mixed $new A namespace or array of namespaces to add.
Returns
  • array The list of namespaces that have been added.
Since
  • 3.8.0
Show source code of this method: addPrefix Source Code

public static array
(mixed $showOn, mixed $formControl = null, mixed $group = null)

Parse the show on conditions
Parameters
  • string $showOn Show on conditions.
  • string $formControl Form name.
  • string $group The dot-separated form group path.
Returns
  • array Array with show on conditions.
Since
  • 3.7.0
Show source code of this method: parseShowOnConditions Source Code

Properties Summary

protected static array
$paths
Array with paths where entities(field, rule, form) can be found.
Since
  • 1.7.0
protected static string
$prefixes
The class namespaces.
Since
  • 3.8.0
protected static array
$entities
Static array of Form's entity objects for re-use.
Since
  • 1.7.0

Tags Summary

Since
1.7.0