Drupal Test Helpers module API documentation - release 1.3.1

FieldTypeManagerStub extends FieldTypePluginManager
in package

A stub of the Drupal's default FieldTypePluginManager class.

@package TestHelpers\DrupalServiceStubs

Tags
phpstan-ignore-next-line

We still need to alter the plugin declaration.

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
todo

Investigate this.

phpstan-ignore-next-line

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.


        
On this page

Search results