Function Hook_fields_reference->get_field_types

Definitions

sources/hooks/systems/fields/reference.php

  • Find what field types this hook can serve. This method only needs to be defined if it is not serving a single field type with a name corresponding to the hook itself.
  • Visibility: public
  • Is abstract?: No
  • Is static?: No
  • Is final?: No
  • Returns: array

Parameters

Name Type Passed by reference? Variadic? Default Set Range Description
$filter ?ID_TEXT No No Null N/A N/A Only find if we can potential match this field type (null: no filter)

Returns

  • Map of field type to field type title
  • Type: array
  • Set: N/A
  • Range: N/A

Preview

Code (PHP)

/**
 * Find what field types this hook can serve. This method only needs to be defined if it is not serving a single field type with a name corresponding to the hook itself.
 *
 * @param  ?ID_TEXT $filter Only find if we can potential match this field type (null: no filter)
 * @return array Map of field type to field type title
 */

public function get_field_types(?string $filter = null) : array