FieldTypeManagerStub
extends FieldTypePluginManager
in package
A stub of the Drupal's default FieldTypePluginManager class.
@package TestHelpers\DrupalServiceStubs
Tags
Table of Contents
Properties
- $definitions : array<string|int, mixed>
- Static storage for defined definitions.
- $fieldItemClassByListClassMap : array<string|int, mixed>
- Mapping of field item classes by list class.
Methods
- __construct() : mixed
- Constructs a new FieldTypeManagerStub.
- getCachedDefinitions() : mixed
- {@inheritdoc}
- getDefaultFieldSettings() : mixed
- {@inheritdoc}
- getDefaultStorageSettings() : mixed
- {@inheritdoc}
- stubDefineFieldItemClassByListClass() : void
- Defines a field item class by lists class.
- stubSetDefinition() : void
- Sets the definition for field type.
Properties
$definitions
Static storage for defined definitions.
protected
array<string|int, mixed>
$definitions
$fieldItemClassByListClassMap
Mapping of field item classes by list class.
protected
array<string|int, mixed>
$fieldItemClassByListClassMap
Methods
__construct()
Constructs a new FieldTypeManagerStub.
public
__construct() : mixed
No idea about the phpstan warning: Missing cache backend declaration for performance.
Tags
getCachedDefinitions()
{@inheritdoc}
public
getCachedDefinitions() : mixed
getDefaultFieldSettings()
{@inheritdoc}
public
getDefaultFieldSettings(mixed $type) : mixed
Parameters
- $type : mixed
getDefaultStorageSettings()
{@inheritdoc}
public
getDefaultStorageSettings(mixed $type) : mixed
Parameters
- $type : mixed
stubDefineFieldItemClassByListClass()
Defines a field item class by lists class.
public
stubDefineFieldItemClassByListClass(string $listClass, string $itemClass) : void
Parameters
- $listClass : string
-
The list class.
- $itemClass : string
-
The item class.
stubSetDefinition()
Sets the definition for field type.
public
stubSetDefinition(string $fieldType[, mixed $definition = [] ]) : void
Parameters
- $fieldType : string
-
The field type.
- $definition : mixed = []
-
The definition, empty array by default.