Back to FormHelper class

Method loadRuleClass

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

Method loadRuleClass - Source code

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