FOFForm::getInstance
Method to get an instance of a form.
Signature
public function getInstance(string
$name,
[string
$data = null,
[array
$options = true,
[bool
$replace = true,
[bool|string
$xpath = false]]]] )
Parameters
-
$name
- The name of the form.
-
$data
- The name of an XML file or string to load as the form definition.
-
$options
- An array of form options.
-
$replace
- Flag to toggle whether form fields should be replaced if a field
-
$xpath
- An optional xpath to search for the fields.
Returns
- FOFForm instance.
Errors/Exceptions
-
InvalidArgumentException
- if no data provided.
-
RuntimeException
- if the form could not be loaded.
Parent Implementation