Back to FormHelper class

Method loadRuleType

public static \Joomla\CMS\Form\FormRule|bool
loadRuleType
(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
Class: FormHelper
Project: Joomla

Method loadRuleType - Source code

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