You are here

public function FieldTypePluginManagerDummy::createFieldItem in Entity Construction Kit (ECK) 8

Creates a new field item as part of a field item list.

The provided item list is assigned as the parent of the created item. It However, it is the responsibility of the caller (usually the parent list itself) to have the parent aware of the item as a new child.

Parameters

\Drupal\Core\Field\FieldItemListInterface $items: The field item list, for which to create a new item.

int $index: The list index at which the item is created.

array|null $values: (optional) The values to assign to the field item properties.

Return value

\Drupal\Core\Field\FieldItemInterface The instantiated object.

Overrides FieldTypePluginManagerInterface::createFieldItem

File

tests/src/Unit/TestDoubles/FieldTypePluginManagerDummy.php, line 73

Class

FieldTypePluginManagerDummy
Dummy implementation of FieldTypePluginManagerInterface.

Namespace

Drupal\Tests\eck\Unit\TestDoubles

Code

public function createFieldItem(FieldItemListInterface $items, $index, $values = NULL) {

  // Stub.
}