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 syntax

Internal usage

// basic internal usage
$fieldtypes = fieldtypes();

// internal usage with all arguments
$fieldtypes = fieldtypes(string $name = '');

Arguments

NameType(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