[ Index ]

PHP Cross Reference of Joomla 4.2.2 documentation

title

Body

[close]

/libraries/src/Form/ -> FormHelper.php (summary)

Joomla! Content Management System

Copyright: (C) 2010 Open Source Matters, Inc.
License: GNU General Public License version 2 or later; see LICENSE.txt
File Size: 547 lines (17 kb)
Included or required:0 times
Referenced: 0 times
Includes or requires: 0 files

Defines 1 class

FormHelper:: (19 methods):
  loadFieldType()
  loadRuleType()
  loadFilterType()
  loadType()
  loadFieldClass()
  loadRuleClass()
  loadFilterClass()
  loadClass()
  addFieldPath()
  addFormPath()
  addRulePath()
  addFilterPath()
  addPath()
  addFieldPrefix()
  addFormPrefix()
  addRulePrefix()
  addFilterPrefix()
  addPrefix()
  parseShowOnConditions()


Class: FormHelper  - X-Ref

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.

loadFieldType($type, $new = true)   X-Ref
Method to load a form field object given a type.

param: string   $type  The field type.
param: boolean  $new   Flag to toggle whether we should get a new instance of the object.
return: FormField|boolean  FormField object on success, false otherwise.

loadRuleType($type, $new = true)   X-Ref
Method to load a form rule object given a type.

param: string   $type  The rule type.
param: boolean  $new   Flag to toggle whether we should get a new instance of the object.
return: FormRule|boolean  FormRule object on success, false otherwise.

loadFilterType($type, $new = true)   X-Ref
Method to load a form filter object given a type.

param: string   $type  The rule type.
param: boolean  $new   Flag to toggle whether we should get a new instance of the object.
return: FormFilterInterface|boolean  FormRule object on success, false otherwise.

loadType($entity, $type, $new = true)   X-Ref
Method to load a form entity object given a type.
Each type is loaded only once and then used as a prototype for other objects of same type.
Please, use this method only with those entities which support types (forms don't support them).

param: string   $entity  The entity.
param: string   $type    The entity type.
param: boolean  $new     Flag to toggle whether we should get a new instance of the object.
return: mixed  Entity object on success, false otherwise.

loadFieldClass($type)   X-Ref
Attempt to import the FormField class file if it isn't already imported.
You can use this method outside of Form for loading a field for inheritance or composition.

param: string  $type  Type of a field whose class should be loaded.
return: string|boolean  Class name on success or false otherwise.

loadRuleClass($type)   X-Ref
Attempt to import the FormRule class file if it isn't already imported.
You can use this method outside of Form for loading a rule for inheritance or composition.

param: string  $type  Type of a rule whose class should be loaded.
return: string|boolean  Class name on success or false otherwise.

loadFilterClass($type)   X-Ref
Attempt to import the FormFilter class file if it isn't already imported.
You can use this method outside of Form for loading a filter for inheritance or composition.

param: string  $type  Type of a filter whose class should be loaded.
return: string|boolean  Class name on success or false otherwise.

loadClass($entity, $type)   X-Ref
Load a class for one of the form's entities of a particular type.
Currently, it makes sense to use this method for the "field" and "rule" entities
(but you can support more entities in your subclass).

param: string  $entity  One of the form entities (field or rule).
param: string  $type    Type of an entity.
return: string|boolean  Class name on success or false otherwise.

addFieldPath($new = null)   X-Ref
Method to add a path to the list of field include paths.

param: mixed  $new  A path or array of paths to add.
return: array  The list of paths that have been added.

addFormPath($new = null)   X-Ref
Method to add a path to the list of form include paths.

param: mixed  $new  A path or array of paths to add.
return: array  The list of paths that have been added.

addRulePath($new = null)   X-Ref
Method to add a path to the list of rule include paths.

param: mixed  $new  A path or array of paths to add.
return: array  The list of paths that have been added.

addFilterPath($new = null)   X-Ref
Method to add a path to the list of filter include paths.

param: mixed  $new  A path or array of paths to add.
return: array  The list of paths that have been added.

addPath($entity, $new = null)   X-Ref
Method to add a path to the list of include paths for one of the form's entities.
Currently supported entities: field, rule and form. You are free to support your own in a subclass.

param: string  $entity  Form's entity name for which paths will be added.
param: mixed   $new     A path or array of paths to add.
return: array  The list of paths that have been added.

addFieldPrefix($new = null)   X-Ref
Method to add a namespace prefix to the list of field lookups.

param: mixed  $new  A namespaces or array of namespaces to add.
return: array  The list of namespaces that have been added.

addFormPrefix($new = null)   X-Ref
Method to add a namespace to the list of form lookups.

param: mixed  $new  A namespace or array of namespaces to add.
return: array  The list of namespaces that have been added.

addRulePrefix($new = null)   X-Ref
Method to add a namespace to the list of rule lookups.

param: mixed  $new  A namespace or array of namespaces to add.
return: array  The list of namespaces that have been added.

addFilterPrefix($new = null)   X-Ref
Method to add a namespace to the list of filter lookups.

param: mixed  $new  A namespace or array of namespaces to add.
return: array  The list of namespaces that have been added.

addPrefix($entity, $new = null)   X-Ref
Method to add a namespace to the list of namespaces for one of the form's entities.
Currently supported entities: field, rule and form. You are free to support your own in a subclass.

param: string  $entity  Form's entity name for which paths will be added.
param: mixed   $new     A namespace or array of namespaces to add.
return: array  The list of namespaces that have been added.

parseShowOnConditions($showOn, $formControl = null, $group = null)   X-Ref
Parse the show on conditions

param: string  $showOn       Show on conditions.
param: string  $formControl  Form name.
param: string  $group        The dot-separated form group path.
return: array   Array with show on conditions.



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