Back to FormHelper class

Method loadFieldClass

public static string|bool
loadFieldClass
(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
Class: FormHelper
Project: Joomla

Method loadFieldClass - Source code

/**
 * 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.
 *
 * @since   1.7.0
 */
public static function loadFieldClass($type)
{
    return self::loadClass('field', $type);
}