fieldtypes() function
Get Fieldtypes ($fieldtypes API variable as a function)
This function behaves the same as the $fieldtypes API variable, though does support
an optional shortcut argument for getting a single Fieldtype.
Please note this method is and thus not intended to be called directly.
Available since version 3.0.258.
Example
$ft = fieldtypes()->get('FieldtypeText'); // regular syntax
$ft = fieldtypes('basic-page'); // shortcut syntaxInternal usage
// basic internal usage
$fieldtypes = fieldtypes();
// internal usage with all arguments
$fieldtypes = fieldtypes(string $name = '');Arguments
| Name | Type(s) | Description |
|---|---|---|
$name (optional) | string | Optional Fieldtype to retrieve |
Return value
Fieldtypes Fieldtype null
Functions methods and properties
API reference based on ProcessWire core version 3.0.259