diff --git a/core/lib/Drupal/Core/Entity/EntityInterface.php b/core/lib/Drupal/Core/Entity/EntityInterface.php
index c0949f7..52dd692 100644
--- a/core/lib/Drupal/Core/Entity/EntityInterface.php
+++ b/core/lib/Drupal/Core/Entity/EntityInterface.php
@@ -19,14 +19,14 @@
* API, while extending them with entity-specific additions. I.e., an entity
* implements the ComplexDataInterface among others, thus is complex data
* containing fields as its data properties. The contained fields have to
- * implement the \Drupal\Core\Entity\Field\FieldInterface, which builds upon
- * typed data interfaces as well.
+ * implement the \Drupal\Core\Entity\Field\FieldItemListInterface, which builds
+ * upon typed data interfaces as well.
*
* When implementing this interface which extends Traversable, make sure to list
* IteratorAggregate or Iterator before this interface in the implements clause.
*
* @see \Drupal\Core\TypedData\TypedDataManager
- * @see \Drupal\Core\Field\FieldInterface
+ * @see \Drupal\Core\Field\FieldItemListInterface
*/
interface EntityInterface extends IdentifiableInterface, ComplexDataInterface, AccessibleInterface, TranslatableInterface {
diff --git a/core/lib/Drupal/Core/Entity/EntityNG.php b/core/lib/Drupal/Core/Entity/EntityNG.php
index 49fa3a0..df1ea79 100644
--- a/core/lib/Drupal/Core/Entity/EntityNG.php
+++ b/core/lib/Drupal/Core/Entity/EntityNG.php
@@ -62,7 +62,7 @@ class EntityNG extends Entity {
protected $values = array();
/**
- * The array of fields, each being an instance of FieldInterface.
+ * The array of fields, each being an instance of FieldItemListInterface.
*
* @var array
*/
@@ -221,7 +221,7 @@ public function get($property_name) {
/**
* Gets a translated field.
*
- * @return \Drupal\Core\Entity\Field\FieldInterface
+ * @return \Drupal\Core\Entity\Field\FieldItemListInterface
*/
protected function getTranslatedField($property_name, $langcode) {
if ($this->translations[$this->activeLangcode]['status'] == static::TRANSLATION_REMOVED) {
diff --git a/core/lib/Drupal/Core/Entity/Field/FieldDefinitionInterface.php b/core/lib/Drupal/Core/Entity/Field/FieldDefinitionInterface.php
index b8d1389..64cfc9e 100644
--- a/core/lib/Drupal/Core/Entity/Field/FieldDefinitionInterface.php
+++ b/core/lib/Drupal/Core/Entity/Field/FieldDefinitionInterface.php
@@ -13,7 +13,7 @@
* Defines an interface for entity field definitions.
*
* An entity field is a data object that holds the values of a particular field
- * for a particular entity (see \Drupal\Core\Entity\Field\FieldInterface). For
+ * for an entity (see \Drupal\Core\Entity\Field\FieldItemListInterface). For
* example, $node_1->body and $node_2->body contain different data and therefore
* are different field objects.
*
diff --git a/core/lib/Drupal/Core/Entity/Field/FieldItemInterface.php b/core/lib/Drupal/Core/Entity/Field/FieldItemInterface.php
index 71fc086..39d4506 100644
--- a/core/lib/Drupal/Core/Entity/Field/FieldItemInterface.php
+++ b/core/lib/Drupal/Core/Entity/Field/FieldItemInterface.php
@@ -18,7 +18,7 @@
* When implementing this interface which extends Traversable, make sure to list
* IteratorAggregate or Iterator before this interface in the implements clause.
*
- * @see \Drupal\Core\Entity\Field\FieldInterface
+ * @see \Drupal\Core\Entity\Field\FieldItemListInterface
* @see \Drupal\Core\Entity\Field\FieldItemBase
*/
interface FieldItemInterface extends ComplexDataInterface {
diff --git a/core/lib/Drupal/Core/Entity/Field/Field.php b/core/lib/Drupal/Core/Entity/Field/FieldItemList.php
similarity index 92%
rename from core/lib/Drupal/Core/Entity/Field/Field.php
rename to core/lib/Drupal/Core/Entity/Field/FieldItemList.php
index 6f8382a..002b933 100644
--- a/core/lib/Drupal/Core/Entity/Field/Field.php
+++ b/core/lib/Drupal/Core/Entity/Field/FieldItemList.php
@@ -7,7 +7,7 @@
namespace Drupal\Core\Entity\Field;
-use Drupal\Core\Entity\Field\FieldInterface;
+use Drupal\Core\Entity\Field\FieldItemListInterface;
use Drupal\Core\Session\AccountInterface;
use Drupal\Core\TypedData\TypedDataInterface;
use Drupal\Core\TypedData\ItemList;
@@ -24,10 +24,8 @@
*
* Supported settings (below the definition's 'settings' key) are:
* - default_value: (optional) If set, the default value to apply to the field.
- *
- * @see \Drupal\Core\Entity\Field\FieldInterface
*/
-class Field extends ItemList implements FieldInterface {
+class FieldItemList extends ItemList implements FieldItemListInterface {
/**
* Numerically indexed array of field items, implementing the
@@ -45,7 +43,7 @@ class Field extends ItemList implements FieldInterface {
protected $langcode = Language::LANGCODE_DEFAULT;
/**
- * Overrides TypedData::__construct().
+ * {@inheritdoc}
*/
public function __construct(array $definition, $name = NULL, TypedDataInterface $parent = NULL) {
parent::__construct($definition, $name, $parent);
@@ -148,49 +146,49 @@ public function setValue($values, $notify = TRUE) {
}
/**
- * Implements \Drupal\Core\Entity\Field\FieldInterface::getPropertyDefinition().
+ * {@inheritdoc}
*/
public function getPropertyDefinition($name) {
return $this->offsetGet(0)->getPropertyDefinition($name);
}
/**
- * Implements \Drupal\Core\Entity\Field\FieldInterface::getPropertyDefinitions().
+ * {@inheritdoc}
*/
public function getPropertyDefinitions() {
return $this->offsetGet(0)->getPropertyDefinitions();
}
/**
- * Implements \Drupal\Core\Entity\Field\FieldInterface::__get().
+ * {@inheritdoc}
*/
public function __get($property_name) {
return $this->offsetGet(0)->__get($property_name);
}
/**
- * Implements \Drupal\Core\Entity\Field\FieldInterface::get().
+ * {@inheritdoc}
*/
public function get($property_name) {
return $this->offsetGet(0)->get($property_name);
}
/**
- * Implements \Drupal\Core\Entity\Field\FieldInterface::__set().
+ * {@inheritdoc}
*/
public function __set($property_name, $value) {
$this->offsetGet(0)->__set($property_name, $value);
}
/**
- * Implements \Drupal\Core\Entity\Field\FieldInterface::__isset().
+ * {@inheritdoc}
*/
public function __isset($property_name) {
return $this->offsetGet(0)->__isset($property_name);
}
/**
- * Implements \Drupal\Core\Entity\Field\FieldInterface::__unset().
+ * {@inheritdoc}
*/
public function __unset($property_name) {
return $this->offsetGet(0)->__unset($property_name);
diff --git a/core/lib/Drupal/Core/Entity/Field/FieldInterface.php b/core/lib/Drupal/Core/Entity/Field/FieldItemListInterface.php
similarity index 96%
rename from core/lib/Drupal/Core/Entity/Field/FieldInterface.php
rename to core/lib/Drupal/Core/Entity/Field/FieldItemListInterface.php
index 4708418..f5bfc22 100644
--- a/core/lib/Drupal/Core/Entity/Field/FieldInterface.php
+++ b/core/lib/Drupal/Core/Entity/Field/FieldItemListInterface.php
@@ -2,7 +2,7 @@
/**
* @file
- * Contains \Drupal\Core\Entity\Field\FieldInterface.
+ * Contains \Drupal\Core\Entity\Field\FieldItemListInterface.
*/
namespace Drupal\Core\Entity\Field;
@@ -25,7 +25,7 @@
* When implementing this interface which extends Traversable, make sure to list
* IteratorAggregate or Iterator before this interface in the implements clause.
*/
-interface FieldInterface extends ListInterface, AccessibleInterface {
+interface FieldItemListInterface extends ListInterface, AccessibleInterface {
/**
* Gets the entity that field belongs to.
diff --git a/core/lib/Drupal/Core/Entity/Field/FieldTypePluginManager.php b/core/lib/Drupal/Core/Entity/Field/FieldTypePluginManager.php
index 5269769..ad29168 100644
--- a/core/lib/Drupal/Core/Entity/Field/FieldTypePluginManager.php
+++ b/core/lib/Drupal/Core/Entity/Field/FieldTypePluginManager.php
@@ -25,7 +25,7 @@ class FieldTypePluginManager extends DefaultPluginManager {
protected $defaults = array(
'settings' => array(),
'instance_settings' => array(),
- 'list_class' => '\Drupal\field\Plugin\Type\FieldType\ConfigField',
+ 'list_class' => '\Drupal\field\Plugin\Type\FieldType\ConfigFieldItemList',
);
/**
diff --git a/core/lib/Drupal/Core/Entity/Plugin/DataType/BooleanItem.php b/core/lib/Drupal/Core/Entity/Plugin/DataType/BooleanItem.php
index 367cc74..31e3ec8 100644
--- a/core/lib/Drupal/Core/Entity/Plugin/DataType/BooleanItem.php
+++ b/core/lib/Drupal/Core/Entity/Plugin/DataType/BooleanItem.php
@@ -18,7 +18,7 @@
* id = "boolean_field",
* label = @Translation("Boolean field item"),
* description = @Translation("An entity field containing a boolean value."),
- * list_class = "\Drupal\Core\Entity\Field\Field"
+ * list_class = "\Drupal\Core\Entity\Field\FieldItemList"
* )
*/
class BooleanItem extends FieldItemBase {
diff --git a/core/lib/Drupal/Core/Entity/Plugin/DataType/DateItem.php b/core/lib/Drupal/Core/Entity/Plugin/DataType/DateItem.php
index 3fd9aa6..e6f462f 100644
--- a/core/lib/Drupal/Core/Entity/Plugin/DataType/DateItem.php
+++ b/core/lib/Drupal/Core/Entity/Plugin/DataType/DateItem.php
@@ -18,7 +18,7 @@
* id = "date_field",
* label = @Translation("Date field item"),
* description = @Translation("An entity field containing a date value."),
- * list_class = "\Drupal\Core\Entity\Field\Field"
+ * list_class = "\Drupal\Core\Entity\Field\FieldItemList"
* )
*/
class DateItem extends FieldItemBase {
diff --git a/core/lib/Drupal/Core/Entity/Plugin/DataType/EmailItem.php b/core/lib/Drupal/Core/Entity/Plugin/DataType/EmailItem.php
index 3732b73..6d1dba6 100644
--- a/core/lib/Drupal/Core/Entity/Plugin/DataType/EmailItem.php
+++ b/core/lib/Drupal/Core/Entity/Plugin/DataType/EmailItem.php
@@ -19,7 +19,7 @@
* id = "email_field",
* label = @Translation("E-mail field item"),
* description = @Translation("An entity field containing an e-mail value."),
- * list_class = "\Drupal\Core\Entity\Field\Field"
+ * list_class = "\Drupal\Core\Entity\Field\FieldItemList"
* )
*/
class EmailItem extends LegacyConfigFieldItem {
diff --git a/core/lib/Drupal/Core/Entity/Plugin/DataType/EntityReferenceItem.php b/core/lib/Drupal/Core/Entity/Plugin/DataType/EntityReferenceItem.php
index 69b2400..5654747 100644
--- a/core/lib/Drupal/Core/Entity/Plugin/DataType/EntityReferenceItem.php
+++ b/core/lib/Drupal/Core/Entity/Plugin/DataType/EntityReferenceItem.php
@@ -25,7 +25,7 @@
* id = "entity_reference_field",
* label = @Translation("Entity reference field item"),
* description = @Translation("An entity field containing an entity reference."),
- * list_class = "\Drupal\Core\Entity\Field\Field",
+ * list_class = "\Drupal\Core\Entity\Field\FieldItemList",
* constraints = {"ValidReference" = TRUE}
* )
*/
diff --git a/core/lib/Drupal/Core/Entity/Plugin/DataType/FieldItem.php b/core/lib/Drupal/Core/Entity/Plugin/DataType/FieldItem.php
index 71fa264..b630fc7 100644
--- a/core/lib/Drupal/Core/Entity/Plugin/DataType/FieldItem.php
+++ b/core/lib/Drupal/Core/Entity/Plugin/DataType/FieldItem.php
@@ -19,7 +19,7 @@
* @DataType(
* id = "field_item",
* label = @Translation("Field item"),
- * list_class = "\Drupal\Core\Entity\Field\Field",
+ * list_class = "\Drupal\Core\Entity\Field\FieldItemList",
* derivative = "Drupal\Core\Entity\Plugin\DataType\Deriver\FieldItemDeriver"
* )
*/
diff --git a/core/lib/Drupal/Core/Entity/Plugin/DataType/IntegerItem.php b/core/lib/Drupal/Core/Entity/Plugin/DataType/IntegerItem.php
index 4eb4db3..6bd8cf8 100644
--- a/core/lib/Drupal/Core/Entity/Plugin/DataType/IntegerItem.php
+++ b/core/lib/Drupal/Core/Entity/Plugin/DataType/IntegerItem.php
@@ -18,7 +18,7 @@
* id = "integer_field",
* label = @Translation("Integer field item"),
* description = @Translation("An entity field containing an integer value."),
- * list_class = "\Drupal\Core\Entity\Field\Field"
+ * list_class = "\Drupal\Core\Entity\Field\FieldItemList"
* )
*/
class IntegerItem extends FieldItemBase {
diff --git a/core/lib/Drupal/Core/Entity/Plugin/DataType/LanguageItem.php b/core/lib/Drupal/Core/Entity/Plugin/DataType/LanguageItem.php
index 68526f5..b156a34 100644
--- a/core/lib/Drupal/Core/Entity/Plugin/DataType/LanguageItem.php
+++ b/core/lib/Drupal/Core/Entity/Plugin/DataType/LanguageItem.php
@@ -19,7 +19,7 @@
* id = "language_field",
* label = @Translation("Language field item"),
* description = @Translation("An entity field referencing a language."),
- * list_class = "\Drupal\Core\Entity\Field\Field",
+ * list_class = "\Drupal\Core\Entity\Field\FieldItemList",
* constraints = {
* "ComplexData" = {
* "value" = {"Length" = {"max" = 12}}
diff --git a/core/lib/Drupal/Core/Entity/Plugin/DataType/StringItem.php b/core/lib/Drupal/Core/Entity/Plugin/DataType/StringItem.php
index 1f22d49..a243567 100644
--- a/core/lib/Drupal/Core/Entity/Plugin/DataType/StringItem.php
+++ b/core/lib/Drupal/Core/Entity/Plugin/DataType/StringItem.php
@@ -18,7 +18,7 @@
* id = "string_field",
* label = @Translation("String field item"),
* description = @Translation("An entity field containing a string value."),
- * list_class = "\Drupal\Core\Entity\Field\Field"
+ * list_class = "\Drupal\Core\Entity\Field\FieldItemList"
* )
*/
class StringItem extends FieldItemBase {
diff --git a/core/lib/Drupal/Core/Entity/Plugin/DataType/UriItem.php b/core/lib/Drupal/Core/Entity/Plugin/DataType/UriItem.php
index fc398a2..6ce5970 100644
--- a/core/lib/Drupal/Core/Entity/Plugin/DataType/UriItem.php
+++ b/core/lib/Drupal/Core/Entity/Plugin/DataType/UriItem.php
@@ -18,7 +18,7 @@
* id = "uri_field",
* label = @Translation("URI field item"),
* description = @Translation("An entity field containing a URI."),
- * list_class = "\Drupal\Core\Entity\Field\Field"
+ * list_class = "\Drupal\Core\Entity\Field\FieldItemList"
* )
*/
class UriItem extends FieldItemBase {
diff --git a/core/lib/Drupal/Core/Entity/Plugin/DataType/UuidItem.php b/core/lib/Drupal/Core/Entity/Plugin/DataType/UuidItem.php
index d06e69d..3e28741 100644
--- a/core/lib/Drupal/Core/Entity/Plugin/DataType/UuidItem.php
+++ b/core/lib/Drupal/Core/Entity/Plugin/DataType/UuidItem.php
@@ -19,7 +19,7 @@
* id = "uuid_field",
* label = @Translation("UUID field item"),
* description = @Translation("An entity field containing a UUID."),
- * list_class = "\Drupal\Core\Entity\Field\Field",
+ * list_class = "\Drupal\Core\Entity\Field\FieldItemList",
* constraints = {
* "ComplexData" = {
* "value" = {"Length" = {"max" = 128}}
diff --git a/core/lib/Drupal/Core/TypedData/TypedData.php b/core/lib/Drupal/Core/TypedData/TypedData.php
index aa873ac..b97587b 100644
--- a/core/lib/Drupal/Core/TypedData/TypedData.php
+++ b/core/lib/Drupal/Core/TypedData/TypedData.php
@@ -176,7 +176,7 @@ public function getPropertyPath() {
/**
* Implements \Drupal\Core\TypedData\TypedDataInterface::getParent().
*
- * @return \Drupal\Core\Entity\Field\FieldInterface
+ * @return \Drupal\Core\Entity\Field\FieldItemListInterface
*/
public function getParent() {
return $this->parent;
diff --git a/core/modules/aggregator/lib/Drupal/aggregator/Entity/Feed.php b/core/modules/aggregator/lib/Drupal/aggregator/Entity/Feed.php
index 46b3894..104cf28 100644
--- a/core/modules/aggregator/lib/Drupal/aggregator/Entity/Feed.php
+++ b/core/modules/aggregator/lib/Drupal/aggregator/Entity/Feed.php
@@ -45,56 +45,56 @@ class Feed extends EntityNG implements FeedInterface {
*
* @todo rename to id.
*
- * @var \Drupal\Core\Entity\Field\FieldInterface
+ * @var \Drupal\Core\Entity\Field\FieldItemListInterface
*/
public $fid;
/**
* Title of the feed.
*
- * @var \Drupal\Core\Entity\Field\FieldInterface
+ * @var \Drupal\Core\Entity\Field\FieldItemListInterface
*/
public $title;
/**
* The feed language code.
*
- * @var \Drupal\Core\Entity\Field\FieldInterface
+ * @var \Drupal\Core\Entity\Field\FieldItemListInterface
*/
public $langcode;
/**
* URL to the feed.
*
- * @var \Drupal\Core\Entity\Field\FieldInterface
+ * @var \Drupal\Core\Entity\Field\FieldItemListInterface
*/
public $url;
/**
* How often to check for new feed items, in seconds.
*
- * @var \Drupal\Core\Entity\Field\FieldInterface
+ * @var \Drupal\Core\Entity\Field\FieldItemListInterface
*/
public $refresh;
/**
* Last time feed was checked for new items, as Unix timestamp.
*
- * @var \Drupal\Core\Entity\Field\FieldInterface
+ * @var \Drupal\Core\Entity\Field\FieldItemListInterface
*/
public $checked;
/**
* Time when this feed was queued for refresh, 0 if not queued.
*
- * @var \Drupal\Core\Entity\Field\FieldInterface
+ * @var \Drupal\Core\Entity\Field\FieldItemListInterface
*/
public $queued;
/**
* The parent website of the feed; comes from the element in the feed.
*
- * @var \Drupal\Core\Entity\Field\FieldInterface
+ * @var \Drupal\Core\Entity\Field\FieldItemListInterface
*/
public $link ;
@@ -102,35 +102,35 @@ class Feed extends EntityNG implements FeedInterface {
* The parent website's description;
* comes from the element in the feed.
*
- * @var \Drupal\Core\Entity\Field\FieldInterface
+ * @var \Drupal\Core\Entity\Field\FieldItemListInterface
*/
public $description;
/**
* An image representing the feed.
*
- * @var \Drupal\Core\Entity\Field\FieldInterface
+ * @var \Drupal\Core\Entity\Field\FieldItemListInterface
*/
public $image;
/**
* Calculated hash of the feed data, used for validating cache.
*
- * @var \Drupal\Core\Entity\Field\FieldInterface
+ * @var \Drupal\Core\Entity\Field\FieldItemListInterface
*/
public $hash;
/**
* Entity tag HTTP response header, used for validating cache.
*
- * @var \Drupal\Core\Entity\Field\FieldInterface
+ * @var \Drupal\Core\Entity\Field\FieldItemListInterface
*/
public $etag;
/**
* When the feed was last modified, as a Unix timestamp.
*
- * @var \Drupal\Core\Entity\Field\FieldInterface
+ * @var \Drupal\Core\Entity\Field\FieldItemListInterface
*/
public $modified;
diff --git a/core/modules/aggregator/lib/Drupal/aggregator/Entity/Item.php b/core/modules/aggregator/lib/Drupal/aggregator/Entity/Item.php
index f0b6694..f06bf06 100644
--- a/core/modules/aggregator/lib/Drupal/aggregator/Entity/Item.php
+++ b/core/modules/aggregator/lib/Drupal/aggregator/Entity/Item.php
@@ -39,7 +39,7 @@ class Item extends EntityNG implements ItemInterface {
*
* @todo rename to id.
*
- * @var \Drupal\Core\Entity\Field\FieldInterface
+ * @var \Drupal\Core\Entity\Field\FieldItemListInterface
*/
public $iid;
@@ -48,56 +48,56 @@ class Item extends EntityNG implements ItemInterface {
*
* @todo rename to feed_id.
*
- * @var \Drupal\Core\Entity\Field\FieldInterface
+ * @var \Drupal\Core\Entity\Field\FieldItemListInterface
*/
public $fid;
/**
* Title of the feed item.
*
- * @var \Drupal\Core\Entity\Field\FieldInterface
+ * @var \Drupal\Core\Entity\Field\FieldItemListInterface
*/
public $title;
/**
* The feed language code.
*
- * @var \Drupal\Core\Entity\Field\FieldInterface
+ * @var \Drupal\Core\Entity\Field\FieldItemListInterface
*/
public $langcode;
/**
* Link to the feed item.
*
- * @var \Drupal\Core\Entity\Field\FieldInterface
+ * @var \Drupal\Core\Entity\Field\FieldItemListInterface
*/
public $link;
/**
* Author of the feed item.
*
- * @var \Drupal\Core\Entity\Field\FieldInterface
+ * @var \Drupal\Core\Entity\Field\FieldItemListInterface
*/
public $author;
/**
* Body of the feed item.
*
- * @var \Drupal\Core\Entity\Field\FieldInterface
+ * @var \Drupal\Core\Entity\Field\FieldItemListInterface
*/
public $description;
/**
* Posted date of the feed item, as a Unix timestamp.
*
- * @var \Drupal\Core\Entity\Field\FieldInterface
+ * @var \Drupal\Core\Entity\Field\FieldItemListInterface
*/
public $timestamp;
/**
* Unique identifier for the feed item.
*
- * @var \Drupal\Core\Entity\Field\FieldInterface
+ * @var \Drupal\Core\Entity\Field\FieldItemListInterface
*/
public $guid;
diff --git a/core/modules/block/custom_block/lib/Drupal/custom_block/Entity/CustomBlock.php b/core/modules/block/custom_block/lib/Drupal/custom_block/Entity/CustomBlock.php
index 2044050..b012a4f 100644
--- a/core/modules/block/custom_block/lib/Drupal/custom_block/Entity/CustomBlock.php
+++ b/core/modules/block/custom_block/lib/Drupal/custom_block/Entity/CustomBlock.php
@@ -58,14 +58,14 @@ class CustomBlock extends EntityNG implements CustomBlockInterface {
/**
* The block ID.
*
- * @var \Drupal\Core\Entity\Field\FieldInterface
+ * @var \Drupal\Core\Entity\Field\FieldItemListInterface
*/
public $id;
/**
* The block revision ID.
*
- * @var \Drupal\Core\Entity\Field\FieldInterface
+ * @var \Drupal\Core\Entity\Field\FieldItemListInterface
*/
public $revision_id;
@@ -76,42 +76,42 @@ class CustomBlock extends EntityNG implements CustomBlockInterface {
* has been specified. Only default revisions are saved to the block_custom
* table.
*
- * @var \Drupal\Core\Entity\Field\FieldInterface
+ * @var \Drupal\Core\Entity\Field\FieldItemListInterface
*/
public $isDefaultRevision = TRUE;
/**
* The block UUID.
*
- * @var \Drupal\Core\Entity\Field\FieldInterface
+ * @var \Drupal\Core\Entity\Field\FieldItemListInterface
*/
public $uuid;
/**
* The custom block type (bundle).
*
- * @var \Drupal\Core\Entity\Field\FieldInterface
+ * @var \Drupal\Core\Entity\Field\FieldItemListInterface
*/
public $type;
/**
* The block language code.
*
- * @var \Drupal\Core\Entity\Field\FieldInterface
+ * @var \Drupal\Core\Entity\Field\FieldItemListInterface
*/
public $langcode;
/**
* The block description.
*
- * @var \Drupal\Core\Entity\Field\FieldInterface
+ * @var \Drupal\Core\Entity\Field\FieldItemListInterface
*/
public $info;
/**
* The block revision log message.
*
- * @var \Drupal\Core\Entity\Field\FieldInterface
+ * @var \Drupal\Core\Entity\Field\FieldItemListInterface
*/
public $log;
diff --git a/core/modules/comment/lib/Drupal/comment/Entity/Comment.php b/core/modules/comment/lib/Drupal/comment/Entity/Comment.php
index c30d380..6445486 100644
--- a/core/modules/comment/lib/Drupal/comment/Entity/Comment.php
+++ b/core/modules/comment/lib/Drupal/comment/Entity/Comment.php
@@ -58,14 +58,14 @@ class Comment extends EntityNG implements CommentInterface {
*
* @todo Rename to 'id'.
*
- * @var \Drupal\Core\Entity\Field\FieldInterface
+ * @var \Drupal\Core\Entity\Field\FieldItemListInterface
*/
public $cid;
/**
* The comment UUID.
*
- * @var \Drupal\Core\Entity\Field\FieldInterface
+ * @var \Drupal\Core\Entity\Field\FieldItemListInterface
*/
public $uuid;
@@ -74,35 +74,35 @@ class Comment extends EntityNG implements CommentInterface {
*
* @todo: Rename to 'parent_id'.
*
- * @var \Drupal\Core\Entity\Field\FieldInterface
+ * @var \Drupal\Core\Entity\Field\FieldItemListInterface
*/
public $pid;
/**
* The ID of the node to which the comment is attached.
*
- * @var \Drupal\Core\Entity\Field\FieldInterface
+ * @var \Drupal\Core\Entity\Field\FieldItemListInterface
*/
public $nid;
/**
* The comment language code.
*
- * @var \Drupal\Core\Entity\Field\FieldInterface
+ * @var \Drupal\Core\Entity\Field\FieldItemListInterface
*/
public $langcode;
/**
* The comment title.
*
- * @var \Drupal\Core\Entity\Field\FieldInterface
+ * @var \Drupal\Core\Entity\Field\FieldItemListInterface
*/
public $subject;
/**
* The comment author ID.
*
- * @var \Drupal\Core\Entity\Field\FieldInterface
+ * @var \Drupal\Core\Entity\Field\FieldItemListInterface
*/
public $uid;
@@ -111,7 +111,7 @@ class Comment extends EntityNG implements CommentInterface {
*
* For anonymous authors, this is the value as typed in the comment form.
*
- * @var \Drupal\Core\Entity\Field\FieldInterface
+ * @var \Drupal\Core\Entity\Field\FieldItemListInterface
*/
public $name;
@@ -120,7 +120,7 @@ class Comment extends EntityNG implements CommentInterface {
*
* For anonymous authors, this is the value as typed in the comment form.
*
- * @var \Drupal\Core\Entity\Field\FieldInterface
+ * @var \Drupal\Core\Entity\Field\FieldItemListInterface
*/
public $mail;
@@ -129,49 +129,49 @@ class Comment extends EntityNG implements CommentInterface {
*
* For anonymous authors, this is the value as typed in the comment form.
*
- * @var \Drupal\Core\Entity\Field\FieldInterface
+ * @var \Drupal\Core\Entity\Field\FieldItemListInterface
*/
public $homepage;
/**
* The comment author's hostname.
*
- * @var \Drupal\Core\Entity\Field\FieldInterface
+ * @var \Drupal\Core\Entity\Field\FieldItemListInterface
*/
public $hostname;
/**
* The time that the comment was created.
*
- * @var \Drupal\Core\Entity\Field\FieldInterface
+ * @var \Drupal\Core\Entity\Field\FieldItemListInterface
*/
public $created;
/**
* The time that the comment was last edited.
*
- * @var \Drupal\Core\Entity\Field\FieldInterface
+ * @var \Drupal\Core\Entity\Field\FieldItemListInterface
*/
public $changed;
/**
* A boolean field indicating whether the comment is published.
*
- * @var \Drupal\Core\Entity\Field\FieldInterface
+ * @var \Drupal\Core\Entity\Field\FieldItemListInterface
*/
public $status;
/**
* The alphadecimal representation of the comment's place in a thread.
*
- * @var \Drupal\Core\Entity\Field\FieldInterface
+ * @var \Drupal\Core\Entity\Field\FieldItemListInterface
*/
public $thread;
/**
* The comment node type.
*
- * @var \Drupal\Core\Entity\Field\FieldInterface
+ * @var \Drupal\Core\Entity\Field\FieldItemListInterface
*/
public $node_type;
diff --git a/core/modules/datetime/lib/Drupal/datetime/Plugin/field/formatter/DatetimeDefaultFormatter.php b/core/modules/datetime/lib/Drupal/datetime/Plugin/field/formatter/DatetimeDefaultFormatter.php
index 03f172f..c4e6344 100644
--- a/core/modules/datetime/lib/Drupal/datetime/Plugin/field/formatter/DatetimeDefaultFormatter.php
+++ b/core/modules/datetime/lib/Drupal/datetime/Plugin/field/formatter/DatetimeDefaultFormatter.php
@@ -13,7 +13,7 @@
use Drupal\Core\Datetime\DrupalDateTime;
use Drupal\Core\Entity\EntityStorageControllerInterface;
use Drupal\Core\Entity\Field\FieldDefinitionInterface;
-use Drupal\Core\Entity\Field\FieldInterface;
+use Drupal\Core\Entity\Field\FieldItemListInterface;
use Drupal\Core\Plugin\ContainerFactoryPluginInterface;
use Drupal\field\Plugin\Type\Formatter\FormatterBase;
use Symfony\Component\DependencyInjection\ContainerInterface;
@@ -94,7 +94,7 @@ public static function create(ContainerInterface $container, array $configuratio
/**
* {@inheritdoc}
*/
- public function viewElements(FieldInterface $items) {
+ public function viewElements(FieldItemListInterface $items) {
$elements = array();
diff --git a/core/modules/datetime/lib/Drupal/datetime/Plugin/field/formatter/DatetimePlainFormatter.php b/core/modules/datetime/lib/Drupal/datetime/Plugin/field/formatter/DatetimePlainFormatter.php
index 600092f..911d35e 100644
--- a/core/modules/datetime/lib/Drupal/datetime/Plugin/field/formatter/DatetimePlainFormatter.php
+++ b/core/modules/datetime/lib/Drupal/datetime/Plugin/field/formatter/DatetimePlainFormatter.php
@@ -10,8 +10,7 @@
use Drupal\field\Annotation\FieldFormatter;
use Drupal\Core\Annotation\Translation;
use Drupal\field\Plugin\Type\Formatter\FormatterBase;
-use Drupal\Core\Entity\Field\FieldInterface;
-use Drupal\Core\Datetime\DrupalDateTime;
+use Drupal\Core\Entity\Field\FieldItemListInterface;
/**
* Plugin implementation of the 'datetime_plain' formatter.
@@ -29,7 +28,7 @@ class DateTimePlainFormatter extends FormatterBase {
/**
* {@inheritdoc}
*/
- public function viewElements(FieldInterface $items) {
+ public function viewElements(FieldItemListInterface $items) {
$elements = array();
diff --git a/core/modules/datetime/lib/Drupal/datetime/Plugin/field/widget/DatetimeDatelistWidget.php b/core/modules/datetime/lib/Drupal/datetime/Plugin/field/widget/DatetimeDatelistWidget.php
index 37d2c3b..0123088 100644
--- a/core/modules/datetime/lib/Drupal/datetime/Plugin/field/widget/DatetimeDatelistWidget.php
+++ b/core/modules/datetime/lib/Drupal/datetime/Plugin/field/widget/DatetimeDatelistWidget.php
@@ -6,11 +6,11 @@
namespace Drupal\datetime\Plugin\field\widget;
+use Drupal\Core\Entity\Field\FieldItemListInterface;
use Drupal\field\Annotation\FieldWidget;
use Drupal\Core\Annotation\Translation;
use Drupal\field\Plugin\Type\Widget\WidgetBase;
use Drupal\Core\Entity\Field\FieldDefinitionInterface;
-use Drupal\Core\Entity\Field\FieldInterface;
use Drupal\field\FieldInstanceInterface;
use Drupal\datetime\DateHelper;
@@ -58,7 +58,7 @@ public function defaultValueFunction() {
/**
* {@inheritdoc}
*/
- public function formElement(FieldInterface $items, $delta, array $element, array &$form, array &$form_state) {
+ public function formElement(FieldItemListInterface $items, $delta, array $element, array &$form, array &$form_state) {
$date_order = $this->getSetting('date_order');
$time_type = $this->getSetting('time_type');
$increment = $this->getSetting('increment');
diff --git a/core/modules/datetime/lib/Drupal/datetime/Plugin/field/widget/DatetimeDefaultWidget.php b/core/modules/datetime/lib/Drupal/datetime/Plugin/field/widget/DatetimeDefaultWidget.php
index 6628dbb..e0e1dac 100644
--- a/core/modules/datetime/lib/Drupal/datetime/Plugin/field/widget/DatetimeDefaultWidget.php
+++ b/core/modules/datetime/lib/Drupal/datetime/Plugin/field/widget/DatetimeDefaultWidget.php
@@ -6,11 +6,11 @@
namespace Drupal\datetime\Plugin\field\widget;
+use Drupal\Core\Entity\Field\FieldItemListInterface;
use Drupal\field\Annotation\FieldWidget;
use Drupal\Core\Annotation\Translation;
use Drupal\field\Plugin\Type\Widget\WidgetBase;
use Drupal\Core\Entity\Field\FieldDefinitionInterface;
-use Drupal\Core\Entity\Field\FieldInterface;
use Drupal\field\FieldInstanceInterface;
/**
@@ -62,7 +62,7 @@ public function defaultValueFunction() {
/**
* {@inheritdoc}
*/
- public function formElement(FieldInterface $items, $delta, array $element, array &$form, array &$form_state) {
+ public function formElement(FieldItemListInterface $items, $delta, array $element, array &$form, array &$form_state) {
$format_type = datetime_default_format_type();
// We are nesting some sub-elements inside the parent, so we need a wrapper.
diff --git a/core/modules/datetime/lib/Drupal/datetime/Tests/DateTimeItemTest.php b/core/modules/datetime/lib/Drupal/datetime/Tests/DateTimeItemTest.php
index f755730..d5c6d9e 100644
--- a/core/modules/datetime/lib/Drupal/datetime/Tests/DateTimeItemTest.php
+++ b/core/modules/datetime/lib/Drupal/datetime/Tests/DateTimeItemTest.php
@@ -7,7 +7,7 @@
namespace Drupal\datetime\Tests;
-use Drupal\Core\Entity\Field\FieldInterface;
+use Drupal\Core\Entity\Field\FieldItemListInterface;
use Drupal\Core\Entity\Field\FieldItemInterface;
use Drupal\field\Tests\FieldUnitTestBase;
@@ -67,7 +67,7 @@ public function testDateTimeItem() {
// Verify entity has been created properly.
$id = $entity->id();
$entity = entity_load('entity_test', $id);
- $this->assertTrue($entity->field_datetime instanceof FieldInterface, 'Field implements interface.');
+ $this->assertTrue($entity->field_datetime instanceof FieldItemListInterface, 'Field implements interface.');
$this->assertTrue($entity->field_datetime[0] instanceof FieldItemInterface, 'Field item implements interface.');
$this->assertEqual($entity->field_datetime->value, $value);
$this->assertEqual($entity->field_datetime[0]->value, $value);
diff --git a/core/modules/email/lib/Drupal/email/Plugin/field/formatter/MailToFormatter.php b/core/modules/email/lib/Drupal/email/Plugin/field/formatter/MailToFormatter.php
index ecfd479..7af70f1 100644
--- a/core/modules/email/lib/Drupal/email/Plugin/field/formatter/MailToFormatter.php
+++ b/core/modules/email/lib/Drupal/email/Plugin/field/formatter/MailToFormatter.php
@@ -10,7 +10,7 @@
use Drupal\field\Annotation\FieldFormatter;
use Drupal\Core\Annotation\Translation;
use Drupal\field\Plugin\Type\Formatter\FormatterBase;
-use Drupal\Core\Entity\Field\FieldInterface;
+use Drupal\Core\Entity\Field\FieldItemListInterface;
/**
* Plugin implementation of the 'email_mailto' formatter.
@@ -28,7 +28,7 @@ class MailToFormatter extends FormatterBase {
/**
* Implements Drupal\field\Plugin\Type\Formatter\FormatterInterface::viewElements().
*/
- public function viewElements(FieldInterface $items) {
+ public function viewElements(FieldItemListInterface $items) {
$elements = array();
foreach ($items as $delta => $item) {
diff --git a/core/modules/email/lib/Drupal/email/Plugin/field/widget/EmailDefaultWidget.php b/core/modules/email/lib/Drupal/email/Plugin/field/widget/EmailDefaultWidget.php
index 4654e17..a5ec3b4 100644
--- a/core/modules/email/lib/Drupal/email/Plugin/field/widget/EmailDefaultWidget.php
+++ b/core/modules/email/lib/Drupal/email/Plugin/field/widget/EmailDefaultWidget.php
@@ -9,7 +9,7 @@
use Drupal\field\Annotation\FieldWidget;
use Drupal\Core\Annotation\Translation;
-use Drupal\Core\Entity\Field\FieldInterface;
+use Drupal\Core\Entity\Field\FieldItemListInterface;
use Drupal\field\Plugin\Type\Widget\WidgetBase;
/**
@@ -61,7 +61,7 @@ public function settingsSummary() {
/**
* Implements Drupal\field\Plugin\Type\Widget\WidgetInterface::formElement().
*/
- public function formElement(FieldInterface $items, $delta, array $element, array &$form, array &$form_state) {
+ public function formElement(FieldItemListInterface $items, $delta, array $element, array &$form, array &$form_state) {
$element['value'] = $element + array(
'#type' => 'email',
'#default_value' => isset($items[$delta]->value) ? $items[$delta]->value : NULL,
diff --git a/core/modules/email/lib/Drupal/email/Tests/EmailItemTest.php b/core/modules/email/lib/Drupal/email/Tests/EmailItemTest.php
index b4a1bfe..ab05590 100644
--- a/core/modules/email/lib/Drupal/email/Tests/EmailItemTest.php
+++ b/core/modules/email/lib/Drupal/email/Tests/EmailItemTest.php
@@ -7,7 +7,7 @@
namespace Drupal\email\Tests;
-use Drupal\Core\Entity\Field\FieldInterface;
+use Drupal\Core\Entity\Field\FieldItemListInterface;
use Drupal\Core\Entity\Field\FieldItemInterface;
use Drupal\field\Tests\FieldUnitTestBase;
@@ -68,7 +68,7 @@ public function testEmailItem() {
// Verify entity has been created properly.
$id = $entity->id();
$entity = entity_load('entity_test', $id);
- $this->assertTrue($entity->field_email instanceof FieldInterface, 'Field implements interface.');
+ $this->assertTrue($entity->field_email instanceof FieldItemListInterface, 'Field implements interface.');
$this->assertTrue($entity->field_email[0] instanceof FieldItemInterface, 'Field item implements interface.');
$this->assertEqual($entity->field_email->value, $value);
$this->assertEqual($entity->field_email[0]->value, $value);
diff --git a/core/modules/entity_reference/lib/Drupal/entity_reference/Plugin/field/formatter/EntityReferenceEntityFormatter.php b/core/modules/entity_reference/lib/Drupal/entity_reference/Plugin/field/formatter/EntityReferenceEntityFormatter.php
index 490228a..4189d45 100644
--- a/core/modules/entity_reference/lib/Drupal/entity_reference/Plugin/field/formatter/EntityReferenceEntityFormatter.php
+++ b/core/modules/entity_reference/lib/Drupal/entity_reference/Plugin/field/formatter/EntityReferenceEntityFormatter.php
@@ -9,7 +9,7 @@
use Drupal\field\Annotation\FieldFormatter;
use Drupal\Core\Annotation\Translation;
-use Drupal\Core\Entity\Field\FieldInterface;
+use Drupal\Core\Entity\Field\FieldItemListInterface;
use Drupal\entity_reference\RecursiveRenderingException;
use Drupal\entity_reference\Plugin\field\formatter\EntityReferenceFormatterBase;
@@ -78,7 +78,7 @@ public function settingsSummary() {
/**
* {@inheritdoc}
*/
- public function viewElements(FieldInterface $items) {
+ public function viewElements(FieldItemListInterface $items) {
$view_mode = $this->getSetting('view_mode');
$links = $this->getSetting('links');
diff --git a/core/modules/entity_reference/lib/Drupal/entity_reference/Plugin/field/formatter/EntityReferenceIdFormatter.php b/core/modules/entity_reference/lib/Drupal/entity_reference/Plugin/field/formatter/EntityReferenceIdFormatter.php
index 39bdfa8..4a64ecd 100644
--- a/core/modules/entity_reference/lib/Drupal/entity_reference/Plugin/field/formatter/EntityReferenceIdFormatter.php
+++ b/core/modules/entity_reference/lib/Drupal/entity_reference/Plugin/field/formatter/EntityReferenceIdFormatter.php
@@ -9,7 +9,7 @@
use Drupal\field\Annotation\FieldFormatter;
use Drupal\Core\Annotation\Translation;
-use Drupal\Core\Entity\Field\FieldInterface;
+use Drupal\Core\Entity\Field\FieldItemListInterface;
use Drupal\entity_reference\Plugin\field\formatter\EntityReferenceFormatterBase;
/**
@@ -29,7 +29,7 @@ class EntityReferenceIdFormatter extends EntityReferenceFormatterBase {
/**
* Overrides \Drupal\entity_reference\Plugin\field\formatter\EntityReferenceFormatterBase::viewElements().
*/
- public function viewElements(FieldInterface $items) {
+ public function viewElements(FieldItemListInterface $items) {
$elements = array();
foreach ($items as $delta => $item) {
diff --git a/core/modules/entity_reference/lib/Drupal/entity_reference/Plugin/field/formatter/EntityReferenceLabelFormatter.php b/core/modules/entity_reference/lib/Drupal/entity_reference/Plugin/field/formatter/EntityReferenceLabelFormatter.php
index 4db1646..0100e7b 100644
--- a/core/modules/entity_reference/lib/Drupal/entity_reference/Plugin/field/formatter/EntityReferenceLabelFormatter.php
+++ b/core/modules/entity_reference/lib/Drupal/entity_reference/Plugin/field/formatter/EntityReferenceLabelFormatter.php
@@ -9,7 +9,7 @@
use Drupal\field\Annotation\FieldFormatter;
use Drupal\Core\Annotation\Translation;
-use Drupal\Core\Entity\Field\FieldInterface;
+use Drupal\Core\Entity\Field\FieldItemListInterface;
use Drupal\entity_reference\Plugin\field\formatter\EntityReferenceFormatterBase;
/**
@@ -54,7 +54,7 @@ public function settingsSummary() {
/**
* {@inheritdoc}
*/
- public function viewElements(FieldInterface $items) {
+ public function viewElements(FieldItemListInterface $items) {
$elements = array();
foreach ($items as $delta => $item) {
diff --git a/core/modules/entity_reference/lib/Drupal/entity_reference/Plugin/field/widget/AutocompleteWidget.php b/core/modules/entity_reference/lib/Drupal/entity_reference/Plugin/field/widget/AutocompleteWidget.php
index b5f9d6e..9202691 100644
--- a/core/modules/entity_reference/lib/Drupal/entity_reference/Plugin/field/widget/AutocompleteWidget.php
+++ b/core/modules/entity_reference/lib/Drupal/entity_reference/Plugin/field/widget/AutocompleteWidget.php
@@ -9,7 +9,7 @@
use Drupal\field\Annotation\FieldWidget;
use Drupal\Core\Annotation\Translation;
-use Drupal\Core\Entity\Field\FieldInterface;
+use Drupal\Core\Entity\Field\FieldItemListInterface;
use Drupal\entity_reference\Plugin\field\widget\AutocompleteWidgetBase;
/**
@@ -40,7 +40,7 @@ class AutocompleteWidget extends AutocompleteWidgetBase {
/**
* {@inheritdoc}
*/
- public function formElement(FieldInterface $items, $delta, array $element, array &$form, array &$form_state) {
+ public function formElement(FieldItemListInterface $items, $delta, array $element, array &$form, array &$form_state) {
// We let the Field API handles multiple values for us, only take care of
// the one matching our delta.
if (isset($items[$delta])) {
diff --git a/core/modules/entity_reference/lib/Drupal/entity_reference/Plugin/field/widget/AutocompleteWidgetBase.php b/core/modules/entity_reference/lib/Drupal/entity_reference/Plugin/field/widget/AutocompleteWidgetBase.php
index d69a99a..2b222d2 100644
--- a/core/modules/entity_reference/lib/Drupal/entity_reference/Plugin/field/widget/AutocompleteWidgetBase.php
+++ b/core/modules/entity_reference/lib/Drupal/entity_reference/Plugin/field/widget/AutocompleteWidgetBase.php
@@ -9,7 +9,7 @@
use Drupal\Component\Annotation\Plugin;
use Drupal\Core\Annotation\Translation;
-use Drupal\Core\Entity\Field\FieldInterface;
+use Drupal\Core\Entity\Field\FieldItemListInterface;
use Drupal\field\Plugin\Type\Widget\WidgetBase;
use Symfony\Component\Validator\ConstraintViolationInterface;
@@ -70,7 +70,7 @@ public function settingsSummary() {
/**
* {@inheritdoc}
*/
- public function formElement(FieldInterface $items, $delta, array $element, array &$form, array &$form_state) {
+ public function formElement(FieldItemListInterface $items, $delta, array $element, array &$form, array &$form_state) {
global $user;
$entity = $items->getEntity();
@@ -117,7 +117,7 @@ public function elementValidate($element, &$form_state, $form) { }
/**
* Gets the entity labels.
*/
- protected function getLabels(FieldInterface $items) {
+ protected function getLabels(FieldItemListInterface $items) {
if ($items->isEmpty()) {
return array();
}
diff --git a/core/modules/entity_reference/lib/Drupal/entity_reference/Tests/EntityReferenceItemTest.php b/core/modules/entity_reference/lib/Drupal/entity_reference/Tests/EntityReferenceItemTest.php
index 2a50949..b37030a 100644
--- a/core/modules/entity_reference/lib/Drupal/entity_reference/Tests/EntityReferenceItemTest.php
+++ b/core/modules/entity_reference/lib/Drupal/entity_reference/Tests/EntityReferenceItemTest.php
@@ -8,7 +8,7 @@
namespace Drupal\entity_reference\Tests;
use Drupal\Core\Entity\DatabaseStorageController;
-use Drupal\Core\Entity\Field\FieldInterface;
+use Drupal\Core\Entity\Field\FieldItemListInterface;
use Drupal\Core\Entity\Field\FieldItemInterface;
use Drupal\Core\Language\Language;
use Drupal\field\Tests\FieldUnitTestBase;
@@ -73,7 +73,7 @@ public function testEntityReferenceItem() {
$entity->save();
$entity = entity_load('entity_test', $entity->id());
- $this->assertTrue($entity->field_test_taxonomy instanceof FieldInterface, 'Field implements interface.');
+ $this->assertTrue($entity->field_test_taxonomy instanceof FieldItemListInterface, 'Field implements interface.');
$this->assertTrue($entity->field_test_taxonomy[0] instanceof FieldItemInterface, 'Field item implements interface.');
$this->assertEqual($entity->field_test_taxonomy->target_id, $tid);
$this->assertEqual($entity->field_test_taxonomy->entity->name->value, $this->term->name->value);
diff --git a/core/modules/field/field.api.php b/core/modules/field/field.api.php
index 50b5edb..6ecf645 100644
--- a/core/modules/field/field.api.php
+++ b/core/modules/field/field.api.php
@@ -198,8 +198,8 @@ function hook_field_widget_info_alter(array &$info) {
* - form: The form structure to which widgets are being attached. This may be
* a full form structure, or a sub-element of a larger form.
* - widget: The widget plugin instance.
- * - items: The field values, as a \Drupal\Core\Entity\Field\FieldInterface
- * object.
+ * - items: The field values, as a
+ * \Drupal\Core\Entity\Field\FieldItemListInterface object.
* - delta: The order of this item in the array of subelements (0, 1, 2, etc).
* - default: A boolean indicating whether the form is being shown as a dummy
* form to set default values.
diff --git a/core/modules/field/field.install b/core/modules/field/field.install
index c4211ff..59ec29e 100644
--- a/core/modules/field/field.install
+++ b/core/modules/field/field.install
@@ -20,7 +20,7 @@
* - 'type': The field type.
* - 'module': The name of the module providing the field type.
* - 'schema': The field schema, in the same format as
- * Drupal\field\Plugin\Type\FieldType\ConfigFieldInterface::schema().
+ * \Drupal\field\Plugin\Type\FieldType\ConfigFieldItemListInterface::schema().
*
* @ingroup update_api
*/
diff --git a/core/modules/field/field.purge.inc b/core/modules/field/field.purge.inc
index df30467..25db686 100644
--- a/core/modules/field/field.purge.inc
+++ b/core/modules/field/field.purge.inc
@@ -19,7 +19,7 @@
*
* When a single entity is deleted, the Entity storage controller performs the
* following operations:
- * - Invoking the FieldInterface delete() method for each field on the
+ * - Invoking the FieldItemListInterface delete() method for each field on the
* entity. A file field type might use this method to delete uploaded files
* from the filesystem.
* - Removing the data from storage.
diff --git a/core/modules/field/lib/Drupal/field/FieldInterface.php b/core/modules/field/lib/Drupal/field/FieldInterface.php
index 2a03aab..c4ccd0e 100644
--- a/core/modules/field/lib/Drupal/field/FieldInterface.php
+++ b/core/modules/field/lib/Drupal/field/FieldInterface.php
@@ -2,7 +2,7 @@
/**
* @file
- * Contains \Drupal\field\FieldInterface.
+ * Contains \Drupal\field\FieldItemListInterface.
*/
namespace Drupal\field;
diff --git a/core/modules/field/lib/Drupal/field/Plugin/Type/FieldType/ConfigField.php b/core/modules/field/lib/Drupal/field/Plugin/Type/FieldType/ConfigFieldItemList.php
similarity index 94%
rename from core/modules/field/lib/Drupal/field/Plugin/Type/FieldType/ConfigField.php
rename to core/modules/field/lib/Drupal/field/Plugin/Type/FieldType/ConfigFieldItemList.php
index 4d8b685..32bea80 100644
--- a/core/modules/field/lib/Drupal/field/Plugin/Type/FieldType/ConfigField.php
+++ b/core/modules/field/lib/Drupal/field/Plugin/Type/FieldType/ConfigFieldItemList.php
@@ -2,19 +2,19 @@
/**
* @file
- * Contains \Drupal\field\Plugin\Type\FieldType\ConfigField.
+ * Contains \Drupal\field\Plugin\Type\FieldType\ConfigFieldItemList.
*/
namespace Drupal\field\Plugin\Type\FieldType;
use Drupal\Core\TypedData\TypedDataInterface;
-use Drupal\Core\Entity\Field\Field;
+use Drupal\Core\Entity\Field\FieldItemList;
use Drupal\field\Field as FieldAPI;
/**
- * Represents a configurable entity field.
+ * Represents a configurable entity field item list.
*/
-class ConfigField extends Field implements ConfigFieldInterface {
+class ConfigFieldItemList extends FieldItemList implements ConfigFieldItemListInterface {
/**
* The Field instance definition.
diff --git a/core/modules/field/lib/Drupal/field/Plugin/Type/FieldType/ConfigFieldInterface.php b/core/modules/field/lib/Drupal/field/Plugin/Type/FieldType/ConfigFieldItemListInterface.php
similarity index 89%
rename from core/modules/field/lib/Drupal/field/Plugin/Type/FieldType/ConfigFieldInterface.php
rename to core/modules/field/lib/Drupal/field/Plugin/Type/FieldType/ConfigFieldItemListInterface.php
index 2df30a9..43f215f 100644
--- a/core/modules/field/lib/Drupal/field/Plugin/Type/FieldType/ConfigFieldInterface.php
+++ b/core/modules/field/lib/Drupal/field/Plugin/Type/FieldType/ConfigFieldItemListInterface.php
@@ -2,17 +2,17 @@
/**
* @file
- * Contains \Drupal\field\Plugin\Type\FieldType\ConfigFieldInterface.
+ * Contains \Drupal\field\Plugin\Type\FieldType\ConfigFieldItemListInterface.
*/
namespace Drupal\field\Plugin\Type\FieldType;
-use Drupal\Core\Entity\Field\FieldInterface;
+use Drupal\Core\Entity\Field\FieldItemListInterface;
/**
* Interface definition for "configurable fields".
*/
-interface ConfigFieldInterface extends FieldInterface {
+interface ConfigFieldItemListInterface extends FieldItemListInterface {
/**
* Returns a form for the default value input.
diff --git a/core/modules/field/lib/Drupal/field/Plugin/Type/FieldType/LegacyFieldTypeDiscoveryDecorator.php b/core/modules/field/lib/Drupal/field/Plugin/Type/FieldType/LegacyFieldTypeDiscoveryDecorator.php
index 2fc45a4..c21a3f6 100644
--- a/core/modules/field/lib/Drupal/field/Plugin/Type/FieldType/LegacyFieldTypeDiscoveryDecorator.php
+++ b/core/modules/field/lib/Drupal/field/Plugin/Type/FieldType/LegacyFieldTypeDiscoveryDecorator.php
@@ -66,7 +66,7 @@ public function getDefinitions() {
$definition += array(
'id' => $plugin_id,
'provider' => $module,
- 'list_class' => '\Drupal\field\Plugin\field\field_type\LegacyConfigField',
+ 'list_class' => '\Drupal\field\Plugin\field\field_type\LegacyConfigFieldItemList',
);
$definitions[$plugin_id] = $definition;
}
diff --git a/core/modules/field/lib/Drupal/field/Plugin/Type/Formatter/FormatterBase.php b/core/modules/field/lib/Drupal/field/Plugin/Type/Formatter/FormatterBase.php
index 34cadae..82bea1b 100644
--- a/core/modules/field/lib/Drupal/field/Plugin/Type/Formatter/FormatterBase.php
+++ b/core/modules/field/lib/Drupal/field/Plugin/Type/Formatter/FormatterBase.php
@@ -8,7 +8,7 @@
namespace Drupal\field\Plugin\Type\Formatter;
use Drupal\Core\Entity\Field\FieldDefinitionInterface;
-use Drupal\Core\Entity\Field\FieldInterface;
+use Drupal\Core\Entity\Field\FieldItemListInterface;
use Drupal\field\FieldInstanceInterface;
use Drupal\field\Plugin\PluginSettingsBase;
@@ -73,7 +73,7 @@ public function __construct($plugin_id, array $plugin_definition, FieldDefinitio
/**
* {@inheritdoc}
*/
- public function view(FieldInterface $items) {
+ public function view(FieldItemListInterface $items) {
$addition = array();
$elements = $this->viewElements($items);
diff --git a/core/modules/field/lib/Drupal/field/Plugin/Type/Formatter/FormatterInterface.php b/core/modules/field/lib/Drupal/field/Plugin/Type/Formatter/FormatterInterface.php
index 8a38c20..41706a7 100644
--- a/core/modules/field/lib/Drupal/field/Plugin/Type/Formatter/FormatterInterface.php
+++ b/core/modules/field/lib/Drupal/field/Plugin/Type/Formatter/FormatterInterface.php
@@ -7,7 +7,7 @@
namespace Drupal\field\Plugin\Type\Formatter;
-use Drupal\Core\Entity\Field\FieldInterface;
+use Drupal\Core\Entity\Field\FieldItemListInterface;
use Drupal\field\Plugin\PluginSettingsInterface;
/**
@@ -61,32 +61,32 @@ public function settingsSummary();
* parameter by reference.
*
* @param array $entities_items
- * Array of field values (Drupal\Core\Entity\Field\FieldInterface), keyed by
- * entity ID.
+ * Array of field values (Drupal\Core\Entity\Field\FieldItemListInterface),
+ * keyed by entity ID.
*/
public function prepareView(array $entities_items);
/**
* Builds a renderable array for one field on one entity instance.
*
- * @param Drupal\Core\Entity\Field\FieldInterface $items
+ * @param Drupal\Core\Entity\Field\FieldItemListInterface $items
* The field values to be rendered.
*
* @return array
* A renderable array for a themed field with its label and all its values.
*/
- public function view(FieldInterface $items);
+ public function view(FieldItemListInterface $items);
/**
* Builds a renderable array for a field value.
*
- * @param Drupal\Core\Entity\Field\FieldInterface $items
+ * @param Drupal\Core\Entity\Field\FieldItemListInterface $items
* The field values to be rendered.
*
* @return array
* A renderable array for $items, as an array of child elements keyed by
* numeric indexes starting from 0.
*/
- public function viewElements(FieldInterface $items);
+ public function viewElements(FieldItemListInterface $items);
}
diff --git a/core/modules/field/lib/Drupal/field/Plugin/Type/Widget/WidgetBase.php b/core/modules/field/lib/Drupal/field/Plugin/Type/Widget/WidgetBase.php
index a84c94f..bb64e0b 100644
--- a/core/modules/field/lib/Drupal/field/Plugin/Type/Widget/WidgetBase.php
+++ b/core/modules/field/lib/Drupal/field/Plugin/Type/Widget/WidgetBase.php
@@ -9,7 +9,7 @@
use Drupal\Component\Utility\NestedArray;
use Drupal\Core\Entity\Field\FieldDefinitionInterface;
-use Drupal\Core\Entity\Field\FieldInterface;
+use Drupal\Core\Entity\Field\FieldItemListInterface;
use Drupal\field\FieldInstanceInterface;
use Drupal\field\Plugin\PluginSettingsBase;
use Symfony\Component\Validator\ConstraintViolationInterface;
@@ -55,7 +55,7 @@ public function __construct($plugin_id, array $plugin_definition, FieldDefinitio
/**
* {@inheritdoc}
*/
- public function form(FieldInterface $items, array &$form, array &$form_state, $get_delta = NULL) {
+ public function form(FieldItemListInterface $items, array &$form, array &$form_state, $get_delta = NULL) {
$field_name = $this->fieldDefinition->getFieldName();
$parents = $form['#parents'];
@@ -144,7 +144,7 @@ public function form(FieldInterface $items, array &$form, array &$form_state, $g
* - AHAH-'add more' button
* - table display and drag-n-drop value reordering
*/
- protected function formMultipleElements(FieldInterface $items, array &$form, array &$form_state) {
+ protected function formMultipleElements(FieldItemListInterface $items, array &$form, array &$form_state) {
$field_name = $this->fieldDefinition->getFieldName();
$cardinality = $this->fieldDefinition->getFieldCardinality();
$parents = $form['#parents'];
@@ -237,7 +237,7 @@ protected function formMultipleElements(FieldInterface $items, array &$form, arr
/**
* Generates the form element for a single copy of the widget.
*/
- protected function formSingleElement(FieldInterface $items, $delta, array $element, array &$form, array &$form_state) {
+ protected function formSingleElement(FieldItemListInterface $items, $delta, array $element, array &$form, array &$form_state) {
$entity = $items->getEntity();
$element += array(
@@ -273,7 +273,7 @@ protected function formSingleElement(FieldInterface $items, $delta, array $eleme
/**
* {@inheritdoc}
*/
- public function extractFormValues(FieldInterface $items, array $form, array &$form_state) {
+ public function extractFormValues(FieldItemListInterface $items, array $form, array &$form_state) {
$field_name = $this->fieldDefinition->getFieldName();
// Extract the values from $form_state['values'].
@@ -326,7 +326,7 @@ public function extractFormValues(FieldInterface $items, array $form, array &$fo
/**
* {@inheritdoc}
*/
- public function flagErrors(FieldInterface $items, array $form, array &$form_state) {
+ public function flagErrors(FieldItemListInterface $items, array $form, array &$form_state) {
$field_name = $this->fieldDefinition->getFieldName();
$field_state = field_form_get_state($form['#parents'], $field_name, $form_state);
@@ -405,10 +405,10 @@ public function massageFormValues(array $values, array $form, array &$form_state
/**
* Sorts submitted field values according to drag-n-drop reordering.
*
- * @param \Drupal\Core\Entity\Field\FieldInterface $items
+ * @param \Drupal\Core\Entity\Field\FieldItemListInterface $items
* The field values.
*/
- protected function sortItems(FieldInterface $items) {
+ protected function sortItems(FieldItemListInterface $items) {
$cardinality = $this->fieldDefinition->getFieldCardinality();
$is_multiple = ($cardinality == FIELD_CARDINALITY_UNLIMITED) || ($cardinality > 1);
if ($is_multiple && isset($items[0]->_weight)) {
diff --git a/core/modules/field/lib/Drupal/field/Plugin/Type/Widget/WidgetBaseInterface.php b/core/modules/field/lib/Drupal/field/Plugin/Type/Widget/WidgetBaseInterface.php
index d5cd015..110e182 100644
--- a/core/modules/field/lib/Drupal/field/Plugin/Type/Widget/WidgetBaseInterface.php
+++ b/core/modules/field/lib/Drupal/field/Plugin/Type/Widget/WidgetBaseInterface.php
@@ -7,7 +7,7 @@
namespace Drupal\field\Plugin\Type\Widget;
-use Drupal\Core\Entity\Field\FieldInterface;
+use Drupal\Core\Entity\Field\FieldItemListInterface;
use Drupal\field\Plugin\PluginSettingsInterface;
/**
@@ -27,7 +27,7 @@
* TRUE), the 'default value', if any, is pre-populated. Also allows other
* modules to alter the form element by implementing their own hooks.
*
- * @param \Drupal\Core\Entity\Field\FieldInterface $items
+ * @param \Drupal\Core\Entity\Field\FieldItemListInterface $items
* An array of the field values. When creating a new entity this may be NULL
* or an empty array to use default values.
* @param array $form
@@ -41,12 +41,12 @@
* @return array
* The form element array created for this field.
*/
- public function form(FieldInterface $items, array &$form, array &$form_state, $get_delta = NULL);
+ public function form(FieldItemListInterface $items, array &$form, array &$form_state, $get_delta = NULL);
/**
* Extracts field values from submitted form values.
*
- * @param \Drupal\Core\Entity\Field\FieldInterface $items
+ * @param \Drupal\Core\Entity\Field\FieldItemListInterface $items
* The field values. This parameter is altered by reference to receive the
* incoming form values.
* @param array $form
@@ -55,12 +55,12 @@ public function form(FieldInterface $items, array &$form, array &$form_state, $g
* @param array $form_state
* The form state.
*/
- public function extractFormValues(FieldInterface $items, array $form, array &$form_state);
+ public function extractFormValues(FieldItemListInterface $items, array $form, array &$form_state);
/**
* Reports field-level validation errors against actual form elements.
*
- * @param \Drupal\Core\Entity\Field\FieldInterface $items
+ * @param \Drupal\Core\Entity\Field\FieldItemListInterface $items
* The field values.
* @param array $form
* The form structure where field elements are attached to. This might be a
@@ -68,6 +68,6 @@ public function extractFormValues(FieldInterface $items, array $form, array &$fo
* @param array $form_state
* The form state.
*/
- public function flagErrors(FieldInterface $items, array $form, array &$form_state);
+ public function flagErrors(FieldItemListInterface $items, array $form, array &$form_state);
}
diff --git a/core/modules/field/lib/Drupal/field/Plugin/Type/Widget/WidgetInterface.php b/core/modules/field/lib/Drupal/field/Plugin/Type/Widget/WidgetInterface.php
index a64915c..9f64445 100644
--- a/core/modules/field/lib/Drupal/field/Plugin/Type/Widget/WidgetInterface.php
+++ b/core/modules/field/lib/Drupal/field/Plugin/Type/Widget/WidgetInterface.php
@@ -8,7 +8,7 @@
namespace Drupal\field\Plugin\Type\Widget;
use Symfony\Component\Validator\ConstraintViolationInterface;
-use Drupal\Core\Entity\Field\FieldInterface;
+use Drupal\Core\Entity\Field\FieldItemListInterface;
/**
* Interface definition for field widget plugins.
@@ -73,7 +73,7 @@ public function settingsSummary();
* definition and set them as ad-hoc $element['#custom'] properties, for later
* use by its element callbacks.
*
- * @param \Drupal\Core\Entity\Field\FieldInterface $items
+ * @param \Drupal\Core\Entity\Field\FieldItemListInterface $items
* Array of default values for this field.
* @param int $delta
* The order of this item in the array of subelements (0, 1, 2, etc).
@@ -111,7 +111,7 @@ public function settingsSummary();
* @see hook_field_widget_form_alter()
* @see hook_field_widget_WIDGET_TYPE_form_alter()
*/
- public function formElement(FieldInterface $items, $delta, array $element, array &$form, array &$form_state);
+ public function formElement(FieldItemListInterface $items, $delta, array $element, array &$form, array &$form_state);
/**
* Assigns a field-level validation error to the right widget sub-element.
diff --git a/core/modules/field/lib/Drupal/field/Plugin/field/field_type/LegacyConfigField.php b/core/modules/field/lib/Drupal/field/Plugin/field/field_type/LegacyConfigFieldItemList.php
similarity index 92%
rename from core/modules/field/lib/Drupal/field/Plugin/field/field_type/LegacyConfigField.php
rename to core/modules/field/lib/Drupal/field/Plugin/field/field_type/LegacyConfigFieldItemList.php
index f99b0c6..22cd8a0 100644
--- a/core/modules/field/lib/Drupal/field/Plugin/field/field_type/LegacyConfigField.php
+++ b/core/modules/field/lib/Drupal/field/Plugin/field/field_type/LegacyConfigFieldItemList.php
@@ -2,12 +2,12 @@
/**
* @file
- * Contains \Drupal\field\Plugin\field\field_type\LegacyConfigField.
+ * Contains \Drupal\field\Plugin\field\field_type\LegacyConfigFieldItemList.
*/
namespace Drupal\field\Plugin\field\field_type;
-use Drupal\field\Plugin\Type\FieldType\ConfigField;
+use Drupal\field\Plugin\Type\FieldType\ConfigFieldItemList;
use Drupal\field\FieldInstanceInterface;
use Symfony\Component\Validator\ConstraintViolation;
@@ -24,7 +24,7 @@
* @todo Remove once all core field types have been converted (see
* http://drupal.org/node/2014671).
*/
-class LegacyConfigField extends ConfigField {
+class LegacyConfigFieldItemList extends ConfigFieldItemList {
/**
* {@inheritdoc}
@@ -132,7 +132,7 @@ protected function legacyCallback($hook, $args = array()) {
protected function getFieldInstance() {
$instance = $this->getFieldDefinition();
if (!($instance instanceof FieldInstanceInterface)) {
- throw new \UnexpectedValueException('LegacyConfigField::getFieldInstance() called for a field whose definition is not a field instance.');
+ throw new \UnexpectedValueException('LegacyConfigFieldItemList::getFieldInstance() called for a field whose definition is not a field instance.');
}
return $instance;
}
diff --git a/core/modules/field/lib/Drupal/field/Plugin/field/widget/HiddenWidget.php b/core/modules/field/lib/Drupal/field/Plugin/field/widget/HiddenWidget.php
index 33d7b76..8f03bc5 100644
--- a/core/modules/field/lib/Drupal/field/Plugin/field/widget/HiddenWidget.php
+++ b/core/modules/field/lib/Drupal/field/Plugin/field/widget/HiddenWidget.php
@@ -9,7 +9,7 @@
use Drupal\field\Annotation\FieldWidget;
use Drupal\Core\Annotation\Translation;
-use Drupal\Core\Entity\Field\FieldInterface;
+use Drupal\Core\Entity\Field\FieldItemListInterface;
use Drupal\field\Plugin\Type\Widget\WidgetBase;
/**
@@ -27,7 +27,7 @@ class HiddenWidget extends WidgetBase {
/**
* {@inheritdoc}
*/
- public function formElement(FieldInterface $items, $delta, array $element, array &$form, array &$form_state) {
+ public function formElement(FieldItemListInterface $items, $delta, array $element, array &$form, array &$form_state) {
// The purpose of this widget is to be hidden, so nothing to do here.
return array();
}
diff --git a/core/modules/field/lib/Drupal/field/Tests/ShapeItemTest.php b/core/modules/field/lib/Drupal/field/Tests/ShapeItemTest.php
index b54174f..993dbff 100644
--- a/core/modules/field/lib/Drupal/field/Tests/ShapeItemTest.php
+++ b/core/modules/field/lib/Drupal/field/Tests/ShapeItemTest.php
@@ -8,7 +8,7 @@
namespace Drupal\field\Tests;
use Drupal\Core\Entity\Field\FieldItemInterface;
-use Drupal\Core\Entity\Field\FieldInterface;
+use Drupal\Core\Entity\Field\FieldItemListInterface;
/**
* Tests the new entity API for the shape field type.
@@ -71,7 +71,7 @@ public function testShapeItem() {
// Verify entity has been created properly.
$id = $entity->id();
$entity = entity_load('entity_test', $id);
- $this->assertTrue($entity->{$this->field_name} instanceof FieldInterface, 'Field implements interface.');
+ $this->assertTrue($entity->{$this->field_name} instanceof FieldItemListInterface, 'Field implements interface.');
$this->assertTrue($entity->{$this->field_name}[0] instanceof FieldItemInterface, 'Field item implements interface.');
$this->assertEqual($entity->{$this->field_name}->shape, $shape);
$this->assertEqual($entity->{$this->field_name}->color, $color);
diff --git a/core/modules/field/lib/Drupal/field/Tests/TestItemTest.php b/core/modules/field/lib/Drupal/field/Tests/TestItemTest.php
index b4c4aa4..707ddd0 100644
--- a/core/modules/field/lib/Drupal/field/Tests/TestItemTest.php
+++ b/core/modules/field/lib/Drupal/field/Tests/TestItemTest.php
@@ -8,7 +8,7 @@
namespace Drupal\field\Tests;
use Drupal\Core\Entity\Field\FieldItemInterface;
-use Drupal\Core\Entity\Field\FieldInterface;
+use Drupal\Core\Entity\Field\FieldItemListInterface;
/**
* Tests the new entity API for the test field type.
@@ -69,7 +69,7 @@ public function testTestItem() {
// Verify entity has been created properly.
$id = $entity->id();
$entity = entity_load('entity_test', $id);
- $this->assertTrue($entity->{$this->field_name} instanceof FieldInterface, 'Field implements interface.');
+ $this->assertTrue($entity->{$this->field_name} instanceof FieldItemListInterface, 'Field implements interface.');
$this->assertTrue($entity->{$this->field_name}[0] instanceof FieldItemInterface, 'Field item implements interface.');
$this->assertEqual($entity->{$this->field_name}->value, $value);
$this->assertEqual($entity->{$this->field_name}[0]->value, $value);
diff --git a/core/modules/field/tests/modules/field_test/lib/Drupal/field_test/Plugin/field/formatter/TestFieldDefaultFormatter.php b/core/modules/field/tests/modules/field_test/lib/Drupal/field_test/Plugin/field/formatter/TestFieldDefaultFormatter.php
index c2568be..3041b30 100644
--- a/core/modules/field/tests/modules/field_test/lib/Drupal/field_test/Plugin/field/formatter/TestFieldDefaultFormatter.php
+++ b/core/modules/field/tests/modules/field_test/lib/Drupal/field_test/Plugin/field/formatter/TestFieldDefaultFormatter.php
@@ -10,7 +10,7 @@
use Drupal\field\Annotation\FieldFormatter;
use Drupal\Core\Annotation\Translation;
use Drupal\field\Plugin\Type\Formatter\FormatterBase;
-use Drupal\Core\Entity\Field\FieldInterface;
+use Drupal\Core\Entity\Field\FieldItemListInterface;
/**
* Plugin implementation of the 'field_test_default' formatter.
@@ -55,7 +55,7 @@ public function settingsSummary() {
/**
* {@inheritdoc}
*/
- public function viewElements(FieldInterface $items) {
+ public function viewElements(FieldItemListInterface $items) {
$elements = array();
foreach ($items as $delta => $item) {
diff --git a/core/modules/field/tests/modules/field_test/lib/Drupal/field_test/Plugin/field/formatter/TestFieldEmptyFormatter.php b/core/modules/field/tests/modules/field_test/lib/Drupal/field_test/Plugin/field/formatter/TestFieldEmptyFormatter.php
index 70250e1..1d38d7a 100644
--- a/core/modules/field/tests/modules/field_test/lib/Drupal/field_test/Plugin/field/formatter/TestFieldEmptyFormatter.php
+++ b/core/modules/field/tests/modules/field_test/lib/Drupal/field_test/Plugin/field/formatter/TestFieldEmptyFormatter.php
@@ -9,7 +9,7 @@
use Drupal\field\Annotation\FieldFormatter;
use Drupal\Core\Annotation\Translation;
-use Drupal\Core\Entity\Field\FieldInterface;
+use Drupal\Core\Entity\Field\FieldItemListInterface;
use Drupal\field\Plugin\Type\Formatter\FormatterBase;
/**
@@ -31,7 +31,7 @@ class TestFieldEmptyFormatter extends FormatterBase {
/**
* {@inheritdoc}
*/
- public function viewElements(FieldInterface $items) {
+ public function viewElements(FieldItemListInterface $items) {
$elements = array();
if ($items->isEmpty()) {
diff --git a/core/modules/field/tests/modules/field_test/lib/Drupal/field_test/Plugin/field/formatter/TestFieldMultipleFormatter.php b/core/modules/field/tests/modules/field_test/lib/Drupal/field_test/Plugin/field/formatter/TestFieldMultipleFormatter.php
index f7d28af..0508002 100644
--- a/core/modules/field/tests/modules/field_test/lib/Drupal/field_test/Plugin/field/formatter/TestFieldMultipleFormatter.php
+++ b/core/modules/field/tests/modules/field_test/lib/Drupal/field_test/Plugin/field/formatter/TestFieldMultipleFormatter.php
@@ -10,7 +10,7 @@
use Drupal\field\Annotation\FieldFormatter;
use Drupal\Core\Annotation\Translation;
use Drupal\field\Plugin\Type\Formatter\FormatterBase;
-use Drupal\Core\Entity\Field\FieldInterface;
+use Drupal\Core\Entity\Field\FieldItemListInterface;
/**
* Plugin implementation of the 'field_test_multiple' formatter.
@@ -55,7 +55,7 @@ public function settingsSummary() {
/**
* {@inheritdoc}
*/
- public function viewElements(FieldInterface $items) {
+ public function viewElements(FieldItemListInterface $items) {
$elements = array();
if (!empty($items)) {
diff --git a/core/modules/field/tests/modules/field_test/lib/Drupal/field_test/Plugin/field/formatter/TestFieldPrepareViewFormatter.php b/core/modules/field/tests/modules/field_test/lib/Drupal/field_test/Plugin/field/formatter/TestFieldPrepareViewFormatter.php
index c89bc94..46063a5 100644
--- a/core/modules/field/tests/modules/field_test/lib/Drupal/field_test/Plugin/field/formatter/TestFieldPrepareViewFormatter.php
+++ b/core/modules/field/tests/modules/field_test/lib/Drupal/field_test/Plugin/field/formatter/TestFieldPrepareViewFormatter.php
@@ -10,7 +10,7 @@
use Drupal\field\Annotation\FieldFormatter;
use Drupal\Core\Annotation\Translation;
use Drupal\field\Plugin\Type\Formatter\FormatterBase;
-use Drupal\Core\Entity\Field\FieldInterface;
+use Drupal\Core\Entity\Field\FieldItemListInterface;
/**
* Plugin implementation of the 'field_test_with_prepare_view' formatter.
@@ -69,7 +69,7 @@ public function prepareView(array $entities_items) {
/**
* {@inheritdoc}
*/
- public function viewElements(FieldInterface $items) {
+ public function viewElements(FieldItemListInterface $items) {
$elements = array();
foreach ($items as $delta => $item) {
diff --git a/core/modules/field/tests/modules/field_test/lib/Drupal/field_test/Plugin/field/widget/TestFieldWidget.php b/core/modules/field/tests/modules/field_test/lib/Drupal/field_test/Plugin/field/widget/TestFieldWidget.php
index 4cfb1a2..de94c08 100644
--- a/core/modules/field/tests/modules/field_test/lib/Drupal/field_test/Plugin/field/widget/TestFieldWidget.php
+++ b/core/modules/field/tests/modules/field_test/lib/Drupal/field_test/Plugin/field/widget/TestFieldWidget.php
@@ -9,7 +9,7 @@
use Drupal\field\Annotation\FieldWidget;
use Drupal\Core\Annotation\Translation;
-use Drupal\Core\Entity\Field\FieldInterface;
+use Drupal\Core\Entity\Field\FieldItemListInterface;
use Drupal\field\Plugin\Type\Widget\WidgetBase;
use Symfony\Component\Validator\ConstraintViolationInterface;
@@ -56,7 +56,7 @@ public function settingsSummary() {
/**
* {@inheritdoc}
*/
- public function formElement(FieldInterface $items, $delta, array $element, array &$form, array &$form_state) {
+ public function formElement(FieldItemListInterface $items, $delta, array $element, array &$form, array &$form_state) {
$element += array(
'#type' => 'textfield',
'#default_value' => isset($items[$delta]->value) ? $items[$delta]->value : '',
diff --git a/core/modules/field/tests/modules/field_test/lib/Drupal/field_test/Plugin/field/widget/TestFieldWidgetMultiple.php b/core/modules/field/tests/modules/field_test/lib/Drupal/field_test/Plugin/field/widget/TestFieldWidgetMultiple.php
index a937290..0b9a73c 100644
--- a/core/modules/field/tests/modules/field_test/lib/Drupal/field_test/Plugin/field/widget/TestFieldWidgetMultiple.php
+++ b/core/modules/field/tests/modules/field_test/lib/Drupal/field_test/Plugin/field/widget/TestFieldWidgetMultiple.php
@@ -10,7 +10,7 @@
use Drupal\field\Annotation\FieldWidget;
use Drupal\Core\Annotation\Translation;
-use Drupal\Core\Entity\Field\FieldInterface;
+use Drupal\Core\Entity\Field\FieldItemListInterface;
use Drupal\field\Plugin\Type\Widget\WidgetBase;
use Symfony\Component\Validator\ConstraintViolationInterface;
@@ -58,7 +58,7 @@ public function settingsSummary() {
/**
* {@inheritdoc}
*/
- public function formElement(FieldInterface $items, $delta, array $element, array &$form, array &$form_state) {
+ public function formElement(FieldItemListInterface $items, $delta, array $element, array &$form, array &$form_state) {
$values = array();
foreach ($items as $delta => $item) {
$values[] = $item->value;
diff --git a/core/modules/field_ui/lib/Drupal/field_ui/Form/FieldInstanceEditForm.php b/core/modules/field_ui/lib/Drupal/field_ui/Form/FieldInstanceEditForm.php
index d358f0e..68c5bfb 100644
--- a/core/modules/field_ui/lib/Drupal/field_ui/Form/FieldInstanceEditForm.php
+++ b/core/modules/field_ui/lib/Drupal/field_ui/Form/FieldInstanceEditForm.php
@@ -214,7 +214,7 @@ public function delete(array &$form, array &$form_state) {
* @param string $field_name
* The field name.
*
- * @return \Drupal\field\Plugin\Type\FieldType\ConfigFieldInterface
+ * @return \Drupal\field\Plugin\Type\FieldType\ConfigFieldItemListInterface
* The field object.
*/
protected function getFieldItems(EntityInterface $entity, $field_name) {
diff --git a/core/modules/file/lib/Drupal/file/Plugin/field/field_type/FileField.php b/core/modules/file/lib/Drupal/file/Plugin/field/field_type/FileFieldItemList.php
similarity index 94%
rename from core/modules/file/lib/Drupal/file/Plugin/field/field_type/FileField.php
rename to core/modules/file/lib/Drupal/file/Plugin/field/field_type/FileFieldItemList.php
index 9483fd1..5420d8e 100644
--- a/core/modules/file/lib/Drupal/file/Plugin/field/field_type/FileField.php
+++ b/core/modules/file/lib/Drupal/file/Plugin/field/field_type/FileFieldItemList.php
@@ -7,12 +7,12 @@
namespace Drupal\file\Plugin\field\field_type;
-use Drupal\field\Plugin\Type\FieldType\ConfigField;
+use Drupal\field\Plugin\Type\FieldType\ConfigFieldItemList;
/**
* Represents a configurable entity file field.
*/
-class FileField extends ConfigField {
+class FileFieldItemList extends ConfigFieldItemList {
/**
* {@inheritdoc}
diff --git a/core/modules/file/lib/Drupal/file/Plugin/field/field_type/FileItem.php b/core/modules/file/lib/Drupal/file/Plugin/field/field_type/FileItem.php
index 2ee23f4..fc6be34 100644
--- a/core/modules/file/lib/Drupal/file/Plugin/field/field_type/FileItem.php
+++ b/core/modules/file/lib/Drupal/file/Plugin/field/field_type/FileItem.php
@@ -33,7 +33,7 @@
* },
* default_widget = "file_generic",
* default_formatter = "file_default",
- * list_class = "\Drupal\file\Plugin\field\field_type\FileField"
+ * list_class = "\Drupal\file\Plugin\field\field_type\FileFieldItemList"
* )
*/
class FileItem extends EntityReferenceItem implements ConfigFieldItemInterface {
diff --git a/core/modules/file/lib/Drupal/file/Plugin/field/formatter/GenericFileFormatter.php b/core/modules/file/lib/Drupal/file/Plugin/field/formatter/GenericFileFormatter.php
index 6ef87c0..30d7e12 100644
--- a/core/modules/file/lib/Drupal/file/Plugin/field/formatter/GenericFileFormatter.php
+++ b/core/modules/file/lib/Drupal/file/Plugin/field/formatter/GenericFileFormatter.php
@@ -9,7 +9,7 @@
use Drupal\field\Annotation\FieldFormatter;
use Drupal\Core\Annotation\Translation;
-use Drupal\Core\Entity\Field\FieldInterface;
+use Drupal\Core\Entity\Field\FieldItemListInterface;
/**
* Plugin implementation of the 'file_default' formatter.
@@ -27,7 +27,7 @@ class GenericFileFormatter extends FileFormatterBase {
/**
* Implements \Drupal\field\Plugin\Type\Formatter\FormatterInterface::viewElements().
*/
- public function viewElements(FieldInterface $items) {
+ public function viewElements(FieldItemListInterface $items) {
$elements = array();
foreach ($items as $delta => $item) {
diff --git a/core/modules/file/lib/Drupal/file/Plugin/field/formatter/RSSEnclosureFormatter.php b/core/modules/file/lib/Drupal/file/Plugin/field/formatter/RSSEnclosureFormatter.php
index cac914e..d23e98a 100644
--- a/core/modules/file/lib/Drupal/file/Plugin/field/formatter/RSSEnclosureFormatter.php
+++ b/core/modules/file/lib/Drupal/file/Plugin/field/formatter/RSSEnclosureFormatter.php
@@ -9,7 +9,7 @@
use Drupal\field\Annotation\FieldFormatter;
use Drupal\Core\Annotation\Translation;
-use Drupal\Core\Entity\Field\FieldInterface;
+use Drupal\Core\Entity\Field\FieldItemListInterface;
/**
* Plugin implementation of the 'file_rss_enclosure' formatter.
@@ -27,7 +27,7 @@ class RSSEnclosureFormatter extends FileFormatterBase {
/**
* Implements \Drupal\field\Plugin\Type\Formatter\FormatterInterface::viewElements().
*/
- public function viewElements(FieldInterface $items) {
+ public function viewElements(FieldItemListInterface $items) {
$entity = $items->getEntity();
// Add the first file as an enclosure to the RSS item. RSS allows only one
// enclosure per item. See: http://en.wikipedia.org/wiki/RSS_enclosure
diff --git a/core/modules/file/lib/Drupal/file/Plugin/field/formatter/TableFormatter.php b/core/modules/file/lib/Drupal/file/Plugin/field/formatter/TableFormatter.php
index 94e5344..8405411 100644
--- a/core/modules/file/lib/Drupal/file/Plugin/field/formatter/TableFormatter.php
+++ b/core/modules/file/lib/Drupal/file/Plugin/field/formatter/TableFormatter.php
@@ -9,7 +9,7 @@
use Drupal\field\Annotation\FieldFormatter;
use Drupal\Core\Annotation\Translation;
-use Drupal\Core\Entity\Field\FieldInterface;
+use Drupal\Core\Entity\Field\FieldItemListInterface;
/**
* Plugin implementation of the 'file_table' formatter.
@@ -27,7 +27,7 @@ class TableFormatter extends FileFormatterBase {
/**
* Implements \Drupal\field\Plugin\Type\Formatter\FormatterInterface::viewElements().
*/
- public function viewElements(FieldInterface $items) {
+ public function viewElements(FieldItemListInterface $items) {
$elements = array();
if (!$items->isEmpty()) {
diff --git a/core/modules/file/lib/Drupal/file/Plugin/field/formatter/UrlPlainFormatter.php b/core/modules/file/lib/Drupal/file/Plugin/field/formatter/UrlPlainFormatter.php
index d96b338..21c32f9 100644
--- a/core/modules/file/lib/Drupal/file/Plugin/field/formatter/UrlPlainFormatter.php
+++ b/core/modules/file/lib/Drupal/file/Plugin/field/formatter/UrlPlainFormatter.php
@@ -9,7 +9,7 @@
use Drupal\field\Annotation\FieldFormatter;
use Drupal\Core\Annotation\Translation;
-use Drupal\Core\Entity\Field\FieldInterface;
+use Drupal\Core\Entity\Field\FieldItemListInterface;
/**
* Plugin implementation of the 'file_url_plain' formatter.
@@ -27,7 +27,7 @@ class UrlPlainFormatter extends FileFormatterBase {
/**
* Implements \Drupal\field\Plugin\Type\Formatter\FormatterInterface::viewElements().
*/
- public function viewElements(FieldInterface $items) {
+ public function viewElements(FieldItemListInterface $items) {
$elements = array();
foreach ($items as $delta => $item) {
diff --git a/core/modules/file/lib/Drupal/file/Plugin/field/widget/FileWidget.php b/core/modules/file/lib/Drupal/file/Plugin/field/widget/FileWidget.php
index 091b4c7..01f4aec 100644
--- a/core/modules/file/lib/Drupal/file/Plugin/field/widget/FileWidget.php
+++ b/core/modules/file/lib/Drupal/file/Plugin/field/widget/FileWidget.php
@@ -10,7 +10,7 @@
use Drupal\field\Annotation\FieldWidget;
use Drupal\Core\Annotation\Translation;
use Drupal\field\Plugin\Type\Widget\WidgetBase;
-use Drupal\Core\Entity\Field\FieldInterface;
+use Drupal\Core\Entity\Field\FieldItemListInterface;
/**
* Plugin implementation of the 'file_generic' widget.
@@ -61,7 +61,7 @@ public function settingsSummary() {
*
* Special handling for draggable multiple widgets and 'add more' button.
*/
- protected function formMultipleElements(FieldInterface $items, array &$form, array &$form_state) {
+ protected function formMultipleElements(FieldItemListInterface $items, array &$form, array &$form_state) {
$field_name = $this->fieldDefinition->getFieldName();
$parents = $form['#parents'];
@@ -172,7 +172,7 @@ protected function formMultipleElements(FieldInterface $items, array &$form, arr
/**
* {@inheritdoc}
*/
- public function formElement(FieldInterface $items, $delta, array $element, array &$form, array &$form_state) {
+ public function formElement(FieldItemListInterface $items, $delta, array $element, array &$form, array &$form_state) {
$field_settings = $this->getFieldSettings();
// The field settings include defaults for the field type. However, this
diff --git a/core/modules/file/lib/Drupal/file/Tests/FileItemTest.php b/core/modules/file/lib/Drupal/file/Tests/FileItemTest.php
index 39674e2..ceea4bc 100644
--- a/core/modules/file/lib/Drupal/file/Tests/FileItemTest.php
+++ b/core/modules/file/lib/Drupal/file/Tests/FileItemTest.php
@@ -8,7 +8,7 @@
namespace Drupal\file\Tests;
use Drupal\Core\Entity\Field\FieldItemInterface;
-use Drupal\Core\Entity\Field\FieldInterface;
+use Drupal\Core\Entity\Field\FieldItemListInterface;
use Drupal\field\Tests\FieldUnitTestBase;
/**
@@ -75,7 +75,7 @@ public function testFileItem() {
$entity->save();
$entity = entity_load('entity_test', $entity->id());
- $this->assertTrue($entity->file_test instanceof FieldInterface, 'Field implements interface.');
+ $this->assertTrue($entity->file_test instanceof FieldItemListInterface, 'Field implements interface.');
$this->assertTrue($entity->file_test[0] instanceof FieldItemInterface, 'Field item implements interface.');
$this->assertEqual($entity->file_test->target_id, $this->file->id());
$this->assertEqual($entity->file_test->display, 1);
diff --git a/core/modules/hal/lib/Drupal/hal/Normalizer/FieldNormalizer.php b/core/modules/hal/lib/Drupal/hal/Normalizer/FieldNormalizer.php
index 71d6672..cbf8b29 100644
--- a/core/modules/hal/lib/Drupal/hal/Normalizer/FieldNormalizer.php
+++ b/core/modules/hal/lib/Drupal/hal/Normalizer/FieldNormalizer.php
@@ -22,7 +22,7 @@ class FieldNormalizer extends NormalizerBase {
*
* @var string
*/
- protected $supportedInterfaceOrClass = 'Drupal\Core\Entity\Field\FieldInterface';
+ protected $supportedInterfaceOrClass = 'Drupal\Core\Entity\Field\FieldItemListInterface';
/**
* Implements \Symfony\Component\Serializer\Normalizer\NormalizerInterface::normalize()
@@ -89,7 +89,7 @@ public function denormalize($data, $class, $format = NULL, array $context = arra
/**
* Helper function to normalize field items.
*
- * @param \Drupal\Core\Entity\Field\FieldInterface $field
+ * @param \Drupal\Core\Entity\Field\FieldItemListInterface $field
* The field object.
* @param string $format
* The format.
diff --git a/core/modules/image/lib/Drupal/image/Plugin/field/field_type/ImageItem.php b/core/modules/image/lib/Drupal/image/Plugin/field/field_type/ImageItem.php
index a6d8972..5fcd89f 100644
--- a/core/modules/image/lib/Drupal/image/Plugin/field/field_type/ImageItem.php
+++ b/core/modules/image/lib/Drupal/image/Plugin/field/field_type/ImageItem.php
@@ -51,7 +51,7 @@
* },
* default_widget = "image_image",
* default_formatter = "image",
- * list_class = "\Drupal\file\Plugin\field\field_type\FileField"
+ * list_class = "\Drupal\file\Plugin\field\field_type\FileFieldItemList"
* )
*/
class ImageItem extends FileItem {
diff --git a/core/modules/image/lib/Drupal/image/Plugin/field/formatter/ImageFormatter.php b/core/modules/image/lib/Drupal/image/Plugin/field/formatter/ImageFormatter.php
index f4cd169..8659511 100644
--- a/core/modules/image/lib/Drupal/image/Plugin/field/formatter/ImageFormatter.php
+++ b/core/modules/image/lib/Drupal/image/Plugin/field/formatter/ImageFormatter.php
@@ -9,7 +9,7 @@
use Drupal\field\Annotation\FieldFormatter;
use Drupal\Core\Annotation\Translation;
-use Drupal\Core\Entity\Field\FieldInterface;
+use Drupal\Core\Entity\Field\FieldItemListInterface;
/**
* Plugin implementation of the 'image' formatter.
@@ -91,7 +91,7 @@ public function settingsSummary() {
/**
* {@inheritdoc}
*/
- public function viewElements(FieldInterface $items) {
+ public function viewElements(FieldItemListInterface $items) {
$elements = array();
$image_link_setting = $this->getSetting('image_link');
diff --git a/core/modules/image/lib/Drupal/image/Plugin/field/widget/ImageWidget.php b/core/modules/image/lib/Drupal/image/Plugin/field/widget/ImageWidget.php
index 99c1eca..f3b5555 100644
--- a/core/modules/image/lib/Drupal/image/Plugin/field/widget/ImageWidget.php
+++ b/core/modules/image/lib/Drupal/image/Plugin/field/widget/ImageWidget.php
@@ -10,7 +10,7 @@
use Drupal\field\Annotation\FieldWidget;
use Drupal\Core\Annotation\Translation;
use Drupal\file\Plugin\field\widget\FileWidget;
-use Drupal\Core\Entity\Field\FieldInterface;
+use Drupal\Core\Entity\Field\FieldItemListInterface;
/**
* Plugin implementation of the 'image_image' widget.
@@ -77,7 +77,7 @@ public function settingsSummary() {
*
* Special handling for draggable multiple widgets and 'add more' button.
*/
- protected function formMultipleElements(FieldInterface $items, array &$form, array &$form_state) {
+ protected function formMultipleElements(FieldItemListInterface $items, array &$form, array &$form_state) {
$elements = parent::formMultipleElements($items, $form, $form_state);
$cardinality = $this->fieldDefinition->getFieldCardinality();
@@ -103,7 +103,7 @@ protected function formMultipleElements(FieldInterface $items, array &$form, arr
/**
* {@inheritdoc}
*/
- public function formElement(FieldInterface $items, $delta, array $element, array &$form, array &$form_state) {
+ public function formElement(FieldItemListInterface $items, $delta, array $element, array &$form, array &$form_state) {
$element = parent::formElement($items, $delta, $element, $form, $form_state);
$field_settings = $this->getFieldSettings();
diff --git a/core/modules/image/lib/Drupal/image/Tests/ImageItemTest.php b/core/modules/image/lib/Drupal/image/Tests/ImageItemTest.php
index cff56f4..4fd70f7 100644
--- a/core/modules/image/lib/Drupal/image/Tests/ImageItemTest.php
+++ b/core/modules/image/lib/Drupal/image/Tests/ImageItemTest.php
@@ -7,7 +7,7 @@
namespace Drupal\image\Tests;
-use Drupal\Core\Entity\Field\FieldInterface;
+use Drupal\Core\Entity\Field\FieldItemListInterface;
use Drupal\Core\Entity\Field\FieldItemInterface;
use Drupal\field\Tests\FieldUnitTestBase;
@@ -80,7 +80,7 @@ public function testImageItem() {
$entity->save();
$entity = entity_load('entity_test', $entity->id());
- $this->assertTrue($entity->image_test instanceof FieldInterface, 'Field implements interface.');
+ $this->assertTrue($entity->image_test instanceof FieldItemListInterface, 'Field implements interface.');
$this->assertTrue($entity->image_test[0] instanceof FieldItemInterface, 'Field item implements interface.');
$this->assertEqual($entity->image_test->target_id, $this->image->id());
$this->assertEqual($entity->image_test->alt, $alt);
diff --git a/core/modules/link/lib/Drupal/link/Plugin/field/formatter/LinkFormatter.php b/core/modules/link/lib/Drupal/link/Plugin/field/formatter/LinkFormatter.php
index 59fe6bb..0c8be66 100644
--- a/core/modules/link/lib/Drupal/link/Plugin/field/formatter/LinkFormatter.php
+++ b/core/modules/link/lib/Drupal/link/Plugin/field/formatter/LinkFormatter.php
@@ -10,7 +10,7 @@
use Drupal\field\Annotation\FieldFormatter;
use Drupal\Core\Annotation\Translation;
use Drupal\Component\Utility\Url;
-use Drupal\Core\Entity\Field\FieldInterface;
+use Drupal\Core\Entity\Field\FieldItemListInterface;
use Drupal\Core\Entity\Field\FieldItemInterface;
use Drupal\field\Plugin\Type\Formatter\FormatterBase;
@@ -116,7 +116,7 @@ public function settingsSummary() {
/**
* {@inheritdoc}
*/
- public function viewElements(FieldInterface $items) {
+ public function viewElements(FieldItemListInterface $items) {
$element = array();
$entity = $items->getEntity();
$settings = $this->getSettings();
diff --git a/core/modules/link/lib/Drupal/link/Plugin/field/formatter/LinkSeparateFormatter.php b/core/modules/link/lib/Drupal/link/Plugin/field/formatter/LinkSeparateFormatter.php
index 59fc268..4674533 100644
--- a/core/modules/link/lib/Drupal/link/Plugin/field/formatter/LinkSeparateFormatter.php
+++ b/core/modules/link/lib/Drupal/link/Plugin/field/formatter/LinkSeparateFormatter.php
@@ -14,7 +14,7 @@
use Drupal\field\Annotation\FieldFormatter;
use Drupal\Core\Annotation\Translation;
-use Drupal\Core\Entity\Field\FieldInterface;
+use Drupal\Core\Entity\Field\FieldItemListInterface;
/**
* Plugin implementation of the 'link_separate' formatter.
@@ -37,7 +37,7 @@ class LinkSeparateFormatter extends LinkFormatter {
/**
* {@inheritdoc}
*/
- public function viewElements(FieldInterface $items) {
+ public function viewElements(FieldItemListInterface $items) {
$element = array();
$entity = $items->getEntity();
$settings = $this->getSettings();
diff --git a/core/modules/link/lib/Drupal/link/Plugin/field/widget/LinkWidget.php b/core/modules/link/lib/Drupal/link/Plugin/field/widget/LinkWidget.php
index 03b9c4d..6f6c295 100644
--- a/core/modules/link/lib/Drupal/link/Plugin/field/widget/LinkWidget.php
+++ b/core/modules/link/lib/Drupal/link/Plugin/field/widget/LinkWidget.php
@@ -9,7 +9,7 @@
use Drupal\field\Annotation\FieldWidget;
use Drupal\Core\Annotation\Translation;
-use Drupal\Core\Entity\Field\FieldInterface;
+use Drupal\Core\Entity\Field\FieldItemListInterface;
use Drupal\field\Plugin\Type\Widget\WidgetBase;
/**
@@ -32,7 +32,7 @@ class LinkWidget extends WidgetBase {
/**
* {@inheritdoc}
*/
- public function formElement(FieldInterface $items, $delta, array $element, array &$form, array &$form_state) {
+ public function formElement(FieldItemListInterface $items, $delta, array $element, array &$form, array &$form_state) {
$element['url'] = array(
'#type' => 'url',
'#title' => t('URL'),
diff --git a/core/modules/link/lib/Drupal/link/Tests/LinkItemTest.php b/core/modules/link/lib/Drupal/link/Tests/LinkItemTest.php
index a42d6a2..00fc51b 100644
--- a/core/modules/link/lib/Drupal/link/Tests/LinkItemTest.php
+++ b/core/modules/link/lib/Drupal/link/Tests/LinkItemTest.php
@@ -7,7 +7,7 @@
namespace Drupal\link\Tests;
-use Drupal\Core\Entity\Field\FieldInterface;
+use Drupal\Core\Entity\Field\FieldItemListInterface;
use Drupal\Core\Entity\Field\FieldItemInterface;
use Drupal\field\Tests\FieldUnitTestBase;
@@ -65,7 +65,7 @@ public function testLinkItem() {
// Verify that the field value is changed.
$id = $entity->id();
$entity = entity_load('entity_test', $id);
- $this->assertTrue($entity->field_test instanceof FieldInterface, 'Field implements interface.');
+ $this->assertTrue($entity->field_test instanceof FieldItemListInterface, 'Field implements interface.');
$this->assertTrue($entity->field_test[0] instanceof FieldItemInterface, 'Field item implements interface.');
$this->assertEqual($entity->field_test->url, $url);
$this->assertEqual($entity->field_test[0]->url, $url);
diff --git a/core/modules/number/lib/Drupal/number/Plugin/field/formatter/DefaultNumberFormatter.php b/core/modules/number/lib/Drupal/number/Plugin/field/formatter/DefaultNumberFormatter.php
index 54a2bb0..7cc14e5 100644
--- a/core/modules/number/lib/Drupal/number/Plugin/field/formatter/DefaultNumberFormatter.php
+++ b/core/modules/number/lib/Drupal/number/Plugin/field/formatter/DefaultNumberFormatter.php
@@ -10,7 +10,7 @@
use Drupal\field\Annotation\FieldFormatter;
use Drupal\Core\Annotation\Translation;
use Drupal\field\Plugin\Type\Formatter\FormatterBase;
-use Drupal\Core\Entity\Field\FieldInterface;
+use Drupal\Core\Entity\Field\FieldItemListInterface;
/**
* Parent plugin for decimal and integer formatters
@@ -64,7 +64,7 @@ public function settingsSummary() {
/**
* {@inheritdoc}
*/
- public function viewElements(FieldInterface $items) {
+ public function viewElements(FieldItemListInterface $items) {
$elements = array();
$settings = $this->getFieldSettings();
diff --git a/core/modules/number/lib/Drupal/number/Plugin/field/formatter/NumberDecimalFormatter.php b/core/modules/number/lib/Drupal/number/Plugin/field/formatter/NumberDecimalFormatter.php
index 012d652..635cfc1 100644
--- a/core/modules/number/lib/Drupal/number/Plugin/field/formatter/NumberDecimalFormatter.php
+++ b/core/modules/number/lib/Drupal/number/Plugin/field/formatter/NumberDecimalFormatter.php
@@ -12,7 +12,7 @@
use Drupal\field\Plugin\Type\Formatter\FormatterBase;
use Drupal\number\Plugin\field\formatter\DefaultNumberFormatter;
use Drupal\Core\Entity\EntityInterface;
-use Drupal\Core\Entity\Field\FieldInterface;
+use Drupal\Core\Entity\Field\FieldItemListInterface;
/**
* Plugin implementation of the 'number_decimal' formatter.
diff --git a/core/modules/number/lib/Drupal/number/Plugin/field/formatter/NumberIntegerFormatter.php b/core/modules/number/lib/Drupal/number/Plugin/field/formatter/NumberIntegerFormatter.php
index 93f0fa5..0fe1838 100644
--- a/core/modules/number/lib/Drupal/number/Plugin/field/formatter/NumberIntegerFormatter.php
+++ b/core/modules/number/lib/Drupal/number/Plugin/field/formatter/NumberIntegerFormatter.php
@@ -12,7 +12,7 @@
use Drupal\field\Plugin\Type\Formatter\FormatterBase;
use Drupal\number\Plugin\field\formatter\DefaultNumberFormatter;
use Drupal\Core\Entity\EntityInterface;
-use Drupal\Core\Entity\Field\FieldInterface;
+use Drupal\Core\Entity\Field\FieldItemListInterface;
/**
* Plugin implementation of the 'number_integer' formatter.
diff --git a/core/modules/number/lib/Drupal/number/Plugin/field/formatter/NumberUnformattedFormatter.php b/core/modules/number/lib/Drupal/number/Plugin/field/formatter/NumberUnformattedFormatter.php
index 53bc19c..4e7eb76 100644
--- a/core/modules/number/lib/Drupal/number/Plugin/field/formatter/NumberUnformattedFormatter.php
+++ b/core/modules/number/lib/Drupal/number/Plugin/field/formatter/NumberUnformattedFormatter.php
@@ -10,7 +10,7 @@
use Drupal\field\Annotation\FieldFormatter;
use Drupal\Core\Annotation\Translation;
use Drupal\field\Plugin\Type\Formatter\FormatterBase;
-use Drupal\Core\Entity\Field\FieldInterface;
+use Drupal\Core\Entity\Field\FieldItemListInterface;
/**
* Plugin implementation of the 'number_unformatted' formatter.
@@ -30,7 +30,7 @@ class NumberUnformattedFormatter extends FormatterBase {
/**
* Implements Drupal\field\Plugin\Type\Formatter\FormatterInterface::viewElements().
*/
- public function viewElements(FieldInterface $items) {
+ public function viewElements(FieldItemListInterface $items) {
$elements = array();
foreach ($items as $delta => $item) {
diff --git a/core/modules/number/lib/Drupal/number/Plugin/field/widget/NumberWidget.php b/core/modules/number/lib/Drupal/number/Plugin/field/widget/NumberWidget.php
index 4dc9d21..49cb2e6 100644
--- a/core/modules/number/lib/Drupal/number/Plugin/field/widget/NumberWidget.php
+++ b/core/modules/number/lib/Drupal/number/Plugin/field/widget/NumberWidget.php
@@ -9,7 +9,7 @@
use Drupal\field\Annotation\FieldWidget;
use Drupal\Core\Annotation\Translation;
-use Drupal\Core\Entity\Field\FieldInterface;
+use Drupal\Core\Entity\Field\FieldItemListInterface;
use Drupal\field\Plugin\Type\Widget\WidgetBase;
use Symfony\Component\Validator\ConstraintViolationInterface;
@@ -64,7 +64,7 @@ public function settingsSummary() {
/**
* {@inheritdoc}
*/
- public function formElement(FieldInterface $items, $delta, array $element, array &$form, array &$form_state) {
+ public function formElement(FieldItemListInterface $items, $delta, array $element, array &$form, array &$form_state) {
$value = isset($items[$delta]->value) ? $items[$delta]->value : NULL;
$field_settings = $this->getFieldSettings();
diff --git a/core/modules/number/lib/Drupal/number/Tests/NumberItemTest.php b/core/modules/number/lib/Drupal/number/Tests/NumberItemTest.php
index 636c55d..96022e7 100644
--- a/core/modules/number/lib/Drupal/number/Tests/NumberItemTest.php
+++ b/core/modules/number/lib/Drupal/number/Tests/NumberItemTest.php
@@ -8,7 +8,7 @@
namespace Drupal\number\Tests;
use Drupal\Core\Entity\Field\FieldItemInterface;
-use Drupal\Core\Entity\Field\FieldInterface;
+use Drupal\Core\Entity\Field\FieldItemListInterface;
use Drupal\field\Tests\FieldUnitTestBase;
/**
@@ -67,15 +67,15 @@ public function testNumberItem() {
// Verify entity has been created properly.
$id = $entity->id();
$entity = entity_load('entity_test', $id);
- $this->assertTrue($entity->field_integer instanceof FieldInterface, 'Field implements interface.');
+ $this->assertTrue($entity->field_integer instanceof FieldItemListInterface, 'Field implements interface.');
$this->assertTrue($entity->field_integer[0] instanceof FieldItemInterface, 'Field item implements interface.');
$this->assertEqual($entity->field_integer->value, $integer);
$this->assertEqual($entity->field_integer[0]->value, $integer);
- $this->assertTrue($entity->field_float instanceof FieldInterface, 'Field implements interface.');
+ $this->assertTrue($entity->field_float instanceof FieldItemListInterface, 'Field implements interface.');
$this->assertTrue($entity->field_float[0] instanceof FieldItemInterface, 'Field item implements interface.');
$this->assertEqual($entity->field_float->value, $float);
$this->assertEqual($entity->field_float[0]->value, $float);
- $this->assertTrue($entity->field_decimal instanceof FieldInterface, 'Field implements interface.');
+ $this->assertTrue($entity->field_decimal instanceof FieldItemListInterface, 'Field implements interface.');
$this->assertTrue($entity->field_decimal[0] instanceof FieldItemInterface, 'Field item implements interface.');
$this->assertEqual($entity->field_decimal->value, $decimal);
$this->assertEqual($entity->field_decimal[0]->value, $decimal);
diff --git a/core/modules/options/lib/Drupal/options/Plugin/field/formatter/OptionsDefaultFormatter.php b/core/modules/options/lib/Drupal/options/Plugin/field/formatter/OptionsDefaultFormatter.php
index 3a1fd8f..5ff8c64 100644
--- a/core/modules/options/lib/Drupal/options/Plugin/field/formatter/OptionsDefaultFormatter.php
+++ b/core/modules/options/lib/Drupal/options/Plugin/field/formatter/OptionsDefaultFormatter.php
@@ -10,7 +10,7 @@
use Drupal\field\Annotation\FieldFormatter;
use Drupal\Core\Annotation\Translation;
use Drupal\field\Plugin\Type\Formatter\FormatterBase;
-use Drupal\Core\Entity\Field\FieldInterface;
+use Drupal\Core\Entity\Field\FieldItemListInterface;
/**
* Plugin implementation of the 'list_default' formatter.
@@ -31,7 +31,7 @@ class OptionsDefaultFormatter extends FormatterBase {
/**
* {@inheritdoc}
*/
- public function viewElements(FieldInterface $items) {
+ public function viewElements(FieldItemListInterface $items) {
$elements = array();
$entity = $items->getEntity();
diff --git a/core/modules/options/lib/Drupal/options/Plugin/field/formatter/OptionsKeyFormatter.php b/core/modules/options/lib/Drupal/options/Plugin/field/formatter/OptionsKeyFormatter.php
index 6fe2b7d..4b80566 100644
--- a/core/modules/options/lib/Drupal/options/Plugin/field/formatter/OptionsKeyFormatter.php
+++ b/core/modules/options/lib/Drupal/options/Plugin/field/formatter/OptionsKeyFormatter.php
@@ -10,7 +10,7 @@
use Drupal\field\Annotation\FieldFormatter;
use Drupal\Core\Annotation\Translation;
use Drupal\field\Plugin\Type\Formatter\FormatterBase;
-use Drupal\Core\Entity\Field\FieldInterface;
+use Drupal\Core\Entity\Field\FieldItemListInterface;
/**
* Plugin implementation of the 'list_key' formatter.
@@ -31,7 +31,7 @@ class OptionsKeyFormatter extends FormatterBase {
/**
* {@inheritdoc}
*/
- public function viewElements(FieldInterface $items) {
+ public function viewElements(FieldItemListInterface $items) {
$elements = array();
foreach ($items as $delta => $item) {
diff --git a/core/modules/options/lib/Drupal/options/Plugin/field/widget/ButtonsWidget.php b/core/modules/options/lib/Drupal/options/Plugin/field/widget/ButtonsWidget.php
index 2077e9c..f6d1263 100644
--- a/core/modules/options/lib/Drupal/options/Plugin/field/widget/ButtonsWidget.php
+++ b/core/modules/options/lib/Drupal/options/Plugin/field/widget/ButtonsWidget.php
@@ -9,7 +9,7 @@
use Drupal\field\Annotation\FieldWidget;
use Drupal\Core\Annotation\Translation;
-use Drupal\Core\Entity\Field\FieldInterface;
+use Drupal\Core\Entity\Field\FieldItemListInterface;
/**
* Plugin implementation of the 'options_buttons' widget.
@@ -31,7 +31,7 @@ class ButtonsWidget extends OptionsWidgetBase {
/**
* {@inheritdoc}
*/
- public function formElement(FieldInterface $items, $delta, array $element, array &$form, array &$form_state) {
+ public function formElement(FieldItemListInterface $items, $delta, array $element, array &$form, array &$form_state) {
$element = parent::formElement($items, $delta, $element, $form, $form_state);
$options = $this->getOptions($items[$delta]);
diff --git a/core/modules/options/lib/Drupal/options/Plugin/field/widget/OnOffWidget.php b/core/modules/options/lib/Drupal/options/Plugin/field/widget/OnOffWidget.php
index a7a94d9..5d7e6e8 100644
--- a/core/modules/options/lib/Drupal/options/Plugin/field/widget/OnOffWidget.php
+++ b/core/modules/options/lib/Drupal/options/Plugin/field/widget/OnOffWidget.php
@@ -9,7 +9,7 @@
use Drupal\field\Annotation\FieldWidget;
use Drupal\Core\Annotation\Translation;
-use Drupal\Core\Entity\Field\FieldInterface;
+use Drupal\Core\Entity\Field\FieldItemListInterface;
/**
* Plugin implementation of the 'options_onoff' widget.
@@ -56,7 +56,7 @@ public function settingsSummary() {
/**
* {@inheritdoc}
*/
- public function formElement(FieldInterface $items, $delta, array $element, array &$form, array &$form_state) {
+ public function formElement(FieldItemListInterface $items, $delta, array $element, array &$form, array &$form_state) {
$element = parent::formElement($items, $delta, $element, $form, $form_state);
$options = $this->getOptions($items[$delta]);
diff --git a/core/modules/options/lib/Drupal/options/Plugin/field/widget/OptionsWidgetBase.php b/core/modules/options/lib/Drupal/options/Plugin/field/widget/OptionsWidgetBase.php
index b9e1559..2301789 100644
--- a/core/modules/options/lib/Drupal/options/Plugin/field/widget/OptionsWidgetBase.php
+++ b/core/modules/options/lib/Drupal/options/Plugin/field/widget/OptionsWidgetBase.php
@@ -8,7 +8,7 @@
namespace Drupal\options\Plugin\field\widget;
use Drupal\Core\Entity\Field\FieldDefinitionInterface;
-use Drupal\Core\Entity\Field\FieldInterface;
+use Drupal\Core\Entity\Field\FieldItemListInterface;
use Drupal\Core\Entity\Field\FieldItemInterface;
use Drupal\field\Plugin\Type\Widget\WidgetBase;
@@ -54,7 +54,7 @@ public function __construct($plugin_id, array $plugin_definition, FieldDefinitio
/**
* {@inheritdoc}
*/
- public function formElement(FieldInterface $items, $delta, array $element, array &$form, array &$form_state) {
+ public function formElement(FieldItemListInterface $items, $delta, array $element, array &$form, array &$form_state) {
// Prepare some properties for the child methods to build the actual form
// element.
$this->required = $element['#required'];
@@ -163,7 +163,7 @@ protected function getOptions(FieldItemInterface $item) {
/**
* Determines selected options from the incoming field values.
*
- * @param \Drupal\Core\Entity\Field\FieldInterface $items
+ * @param \Drupal\Core\Entity\Field\FieldItemListInterface $items
* The field values.
* @param int $delta
* (optional) The delta of the item to get options for. Defaults to 0.
@@ -171,7 +171,7 @@ protected function getOptions(FieldItemInterface $item) {
* @return array
* The array of corresponding selected options.
*/
- protected function getSelectedOptions(FieldInterface $items, $delta = 0) {
+ protected function getSelectedOptions(FieldItemListInterface $items, $delta = 0) {
// We need to check against a flat list of options.
$flat_options = $this->flattenOptions($this->getOptions($items[$delta]));
diff --git a/core/modules/options/lib/Drupal/options/Plugin/field/widget/SelectWidget.php b/core/modules/options/lib/Drupal/options/Plugin/field/widget/SelectWidget.php
index a7c64ea..3a37aeb 100644
--- a/core/modules/options/lib/Drupal/options/Plugin/field/widget/SelectWidget.php
+++ b/core/modules/options/lib/Drupal/options/Plugin/field/widget/SelectWidget.php
@@ -9,7 +9,7 @@
use Drupal\field\Annotation\FieldWidget;
use Drupal\Core\Annotation\Translation;
-use Drupal\Core\Entity\Field\FieldInterface;
+use Drupal\Core\Entity\Field\FieldItemListInterface;
/**
* Plugin implementation of the 'options_select' widget.
@@ -30,7 +30,7 @@ class SelectWidget extends OptionsWidgetBase {
/**
* {@inheritdoc}
*/
- public function formElement(FieldInterface $items, $delta, array $element, array &$form, array &$form_state) {
+ public function formElement(FieldItemListInterface $items, $delta, array $element, array &$form, array &$form_state) {
$element = parent::formElement($items, $delta, $element, $form, $form_state);
$element += array(
diff --git a/core/modules/path/lib/Drupal/path/Plugin/DataType/PathItem.php b/core/modules/path/lib/Drupal/path/Plugin/DataType/PathItem.php
index e72e3a7..11059b5 100644
--- a/core/modules/path/lib/Drupal/path/Plugin/DataType/PathItem.php
+++ b/core/modules/path/lib/Drupal/path/Plugin/DataType/PathItem.php
@@ -18,7 +18,7 @@
* id = "path_field",
* label = @Translation("Path field item"),
* description = @Translation("An entity field containing a path alias and related data."),
- * list_class = "\Drupal\Core\Entity\Field\Field"
+ * list_class = "\Drupal\Core\Entity\Field\FieldItemList"
* )
*/
class PathItem extends FieldItemBase {
diff --git a/core/modules/picture/lib/Drupal/picture/Plugin/field/formatter/PictureFormatter.php b/core/modules/picture/lib/Drupal/picture/Plugin/field/formatter/PictureFormatter.php
index e53f236..c7d0302 100644
--- a/core/modules/picture/lib/Drupal/picture/Plugin/field/formatter/PictureFormatter.php
+++ b/core/modules/picture/lib/Drupal/picture/Plugin/field/formatter/PictureFormatter.php
@@ -9,7 +9,7 @@
use Drupal\field\Annotation\FieldFormatter;
use Drupal\Core\Annotation\Translation;
-use Drupal\Core\Entity\Field\FieldInterface;
+use Drupal\Core\Entity\Field\FieldItemListInterface;
use Drupal\image\Plugin\field\formatter\ImageFormatterBase;
/**
@@ -114,7 +114,7 @@ public function settingsSummary() {
/**
* {@inheritdoc}
*/
- public function viewElements(FieldInterface $items) {
+ public function viewElements(FieldItemListInterface $items) {
$elements = array();
// Check if the formatter involves a link.
if ($this->getSetting('image_link') == 'content') {
diff --git a/core/modules/system/entity.api.php b/core/modules/system/entity.api.php
index 8c2c240..b933f9c 100644
--- a/core/modules/system/entity.api.php
+++ b/core/modules/system/entity.api.php
@@ -704,13 +704,14 @@ function hook_entity_operation_alter(array &$operations, \Drupal\Core\Entity\Ent
/**
* Control access to fields.
*
- * This hook is invoked from \Drupal\Core\Entity\Field\Field::access() to
- * let modules grant or deny operations on fields.
+ * This hook is invoked from
+ * \Drupal\Core\Entity\Field\FieldItemListInterface::access() to let modules
+ * grant or deny operations on fields.
*
* @param string $operation
* The operation to be performed. See
* \Drupal\Core\TypedData\AccessibleInterface::access() for possible values.
- * @param \Drupal\Core\Entity\Field\Field $field
+ * @param \Drupal\Core\Entity\Field\FieldItemListInterface $field
* The entity field object on which the operation is to be performed.
* @param \Drupal\Core\Session\AccountInterface $account
* The user account to check.
diff --git a/core/modules/system/lib/Drupal/system/Tests/Entity/EntityFieldTest.php b/core/modules/system/lib/Drupal/system/Tests/Entity/EntityFieldTest.php
index 9bf20e2..67c40fe 100644
--- a/core/modules/system/lib/Drupal/system/Tests/Entity/EntityFieldTest.php
+++ b/core/modules/system/lib/Drupal/system/Tests/Entity/EntityFieldTest.php
@@ -8,7 +8,7 @@
namespace Drupal\system\Tests\Entity;
use Drupal\Core\Entity\EntityInterface;
-use Drupal\Core\Entity\Field\FieldInterface;
+use Drupal\Core\Entity\Field\FieldItemListInterface;
use Drupal\Core\Entity\Field\FieldItemInterface;
use Drupal\Core\Language\Language;
use Drupal\Core\TypedData\Type\StringInterface;
@@ -97,7 +97,7 @@ protected function assertReadWrite($entity_type) {
$entity = $this->createTestEntity($entity_type);
// Access the name field.
- $this->assertTrue($entity->name instanceof FieldInterface, format_string('%entity_type: Field implements interface', array('%entity_type' => $entity_type)));
+ $this->assertTrue($entity->name instanceof FieldItemListInterface, format_string('%entity_type: Field implements interface', array('%entity_type' => $entity_type)));
$this->assertTrue($entity->name[0] instanceof FieldItemInterface, format_string('%entity_type: Field item implements interface', array('%entity_type' => $entity_type)));
$this->assertEqual($this->entity_name, $entity->name->value, format_string('%entity_type: Name value can be read.', array('%entity_type' => $entity_type)));
@@ -115,7 +115,7 @@ protected function assertReadWrite($entity_type) {
$this->assertEqual($new_name, $entity->name->value, format_string('%entity_type: Name can be updated and read through list access.', array('%entity_type' => $entity_type)));
// Access the user field.
- $this->assertTrue($entity->user_id instanceof FieldInterface, format_string('%entity_type: Field implements interface', array('%entity_type' => $entity_type)));
+ $this->assertTrue($entity->user_id instanceof FieldItemListInterface, format_string('%entity_type: Field implements interface', array('%entity_type' => $entity_type)));
$this->assertTrue($entity->user_id[0] instanceof FieldItemInterface, format_string('%entity_type: Field item implements interface', array('%entity_type' => $entity_type)));
$this->assertEqual($this->entity_user->id(), $entity->user_id->target_id, format_string('%entity_type: User id can be read.', array('%entity_type' => $entity_type)));
@@ -430,7 +430,7 @@ protected function assertIterator($entity_type) {
$entity = $this->createTestEntity($entity_type);
foreach ($entity as $name => $field) {
- $this->assertTrue($field instanceof FieldInterface, $entity_type . ": Field $name implements interface.");
+ $this->assertTrue($field instanceof FieldItemListInterface, $entity_type . ": Field $name implements interface.");
foreach ($field as $delta => $item) {
$this->assertTrue($field[0] instanceof FieldItemInterface, $entity_type . ": Item $delta of field $name implements interface.");
diff --git a/core/modules/system/lib/Drupal/system/Tests/Entity/EntityValidationTest.php b/core/modules/system/lib/Drupal/system/Tests/Entity/EntityValidationTest.php
index b17a700..f7132c6 100644
--- a/core/modules/system/lib/Drupal/system/Tests/Entity/EntityValidationTest.php
+++ b/core/modules/system/lib/Drupal/system/Tests/Entity/EntityValidationTest.php
@@ -8,7 +8,7 @@
namespace Drupal\system\Tests\Entity;
use Drupal\Core\Entity\EntityInterface;
-use Drupal\Core\Entity\Field\FieldInterface;
+use Drupal\Core\Entity\Field\FieldItemListInterface;
use Drupal\Core\Entity\Field\FieldItemInterface;
use Drupal\Core\TypedData\TypedDataInterface;
diff --git a/core/modules/system/tests/modules/entity_test/lib/Drupal/entity_test/Entity/EntityTest.php b/core/modules/system/tests/modules/entity_test/lib/Drupal/entity_test/Entity/EntityTest.php
index 95d74ce..06a7fe7 100644
--- a/core/modules/system/tests/modules/entity_test/lib/Drupal/entity_test/Entity/EntityTest.php
+++ b/core/modules/system/tests/modules/entity_test/lib/Drupal/entity_test/Entity/EntityTest.php
@@ -44,35 +44,35 @@ class EntityTest extends EntityNG {
/**
* The entity ID.
*
- * @var \Drupal\Core\Entity\Field\FieldInterface
+ * @var \Drupal\Core\Entity\Field\FieldItemListInterface
*/
public $id;
/**
* The entity UUID.
*
- * @var \Drupal\Core\Entity\Field\FieldInterface
+ * @var \Drupal\Core\Entity\Field\FieldItemListInterface
*/
public $uuid;
/**
* The bundle of the test entity.
*
- * @var \Drupal\Core\Entity\Field\FieldInterface
+ * @var \Drupal\Core\Entity\Field\FieldItemListInterface
*/
public $type;
/**
* The name of the test entity.
*
- * @var \Drupal\Core\Entity\Field\FieldInterface
+ * @var \Drupal\Core\Entity\Field\FieldItemListInterface
*/
public $name;
/**
* The associated user.
*
- * @var \Drupal\Core\Entity\Field\FieldInterface
+ * @var \Drupal\Core\Entity\Field\FieldItemListInterface
*/
public $user_id;
diff --git a/core/modules/system/tests/modules/entity_test/lib/Drupal/entity_test/Entity/EntityTestCache.php b/core/modules/system/tests/modules/entity_test/lib/Drupal/entity_test/Entity/EntityTestCache.php
index b4a064f..37dccb6 100644
--- a/core/modules/system/tests/modules/entity_test/lib/Drupal/entity_test/Entity/EntityTestCache.php
+++ b/core/modules/system/tests/modules/entity_test/lib/Drupal/entity_test/Entity/EntityTestCache.php
@@ -42,35 +42,35 @@ class EntityTestCache extends EntityTest {
/**
* The entity ID.
*
- * @var \Drupal\Core\Entity\Field\FieldInterface
+ * @var \Drupal\Core\Entity\Field\FieldItemListInterface
*/
public $id;
/**
* The entity UUID.
*
- * @var \Drupal\Core\Entity\Field\FieldInterface
+ * @var \Drupal\Core\Entity\Field\FieldItemListInterface
*/
public $uuid;
/**
* The bundle of the test entity.
*
- * @var \Drupal\Core\Entity\Field\FieldInterface
+ * @var \Drupal\Core\Entity\Field\FieldItemListInterface
*/
public $type;
/**
* The name of the test entity.
*
- * @var \Drupal\Core\Entity\Field\FieldInterface
+ * @var \Drupal\Core\Entity\Field\FieldItemListInterface
*/
public $name;
/**
* The associated user.
*
- * @var \Drupal\Core\Entity\Field\FieldInterface
+ * @var \Drupal\Core\Entity\Field\FieldItemListInterface
*/
public $user_id;
diff --git a/core/modules/system/tests/modules/entity_test/lib/Drupal/entity_test/Entity/EntityTestRev.php b/core/modules/system/tests/modules/entity_test/lib/Drupal/entity_test/Entity/EntityTestRev.php
index 0fabcca..57e3531 100644
--- a/core/modules/system/tests/modules/entity_test/lib/Drupal/entity_test/Entity/EntityTestRev.php
+++ b/core/modules/system/tests/modules/entity_test/lib/Drupal/entity_test/Entity/EntityTestRev.php
@@ -43,7 +43,7 @@ class EntityTestRev extends EntityTest {
/**
* The entity revision id.
*
- * @var \Drupal\Core\Entity\Field\FieldInterface
+ * @var \Drupal\Core\Entity\Field\FieldItemListInterface
*/
public $revision_id;
diff --git a/core/modules/taxonomy/lib/Drupal/taxonomy/Entity/Term.php b/core/modules/taxonomy/lib/Drupal/taxonomy/Entity/Term.php
index 03ddfe2..6b3659d 100644
--- a/core/modules/taxonomy/lib/Drupal/taxonomy/Entity/Term.php
+++ b/core/modules/taxonomy/lib/Drupal/taxonomy/Entity/Term.php
@@ -59,42 +59,42 @@ class Term extends EntityNG implements TermInterface {
/**
* The taxonomy term ID.
*
- * @var \Drupal\Core\Entity\Field\FieldInterface
+ * @var \Drupal\Core\Entity\Field\FieldItemListInterface
*/
public $tid;
/**
* The term UUID.
*
- * @var \Drupal\Core\Entity\Field\FieldInterface
+ * @var \Drupal\Core\Entity\Field\FieldItemListInterface
*/
public $uuid;
/**
* The taxonomy vocabulary ID this term belongs to.
*
- * @var \Drupal\Core\Entity\Field\FieldInterface
+ * @var \Drupal\Core\Entity\Field\FieldItemListInterface
*/
public $vid;
/**
* Name of the term.
*
- * @var \Drupal\Core\Entity\Field\FieldInterface
+ * @var \Drupal\Core\Entity\Field\FieldItemListInterface
*/
public $name;
/**
* Description of the term.
*
- * @var \Drupal\Core\Entity\Field\FieldInterface
+ * @var \Drupal\Core\Entity\Field\FieldItemListInterface
*/
public $description;
/**
* The text format name for the term's description.
*
- * @var \Drupal\Core\Entity\Field\FieldInterface
+ * @var \Drupal\Core\Entity\Field\FieldItemListInterface
*/
public $format;
@@ -104,7 +104,7 @@ class Term extends EntityNG implements TermInterface {
* This property stores the weight of this term in relation to other terms of
* the same vocabulary.
*
- * @var \Drupal\Core\Entity\Field\FieldInterface
+ * @var \Drupal\Core\Entity\Field\FieldItemListInterface
*/
public $weight;
@@ -118,7 +118,7 @@ class Term extends EntityNG implements TermInterface {
* term does not have any parents. When omitting this variable during an
* update, the existing hierarchy for the term remains unchanged.
*
- * @var \Drupal\Core\Entity\Field\FieldInterface
+ * @var \Drupal\Core\Entity\Field\FieldItemListInterface
*/
public $parent;
diff --git a/core/modules/taxonomy/lib/Drupal/taxonomy/Plugin/field/formatter/EntityReferenceTaxonomyTermRssFormatter.php b/core/modules/taxonomy/lib/Drupal/taxonomy/Plugin/field/formatter/EntityReferenceTaxonomyTermRssFormatter.php
index 005d6b6..10eb66d 100644
--- a/core/modules/taxonomy/lib/Drupal/taxonomy/Plugin/field/formatter/EntityReferenceTaxonomyTermRssFormatter.php
+++ b/core/modules/taxonomy/lib/Drupal/taxonomy/Plugin/field/formatter/EntityReferenceTaxonomyTermRssFormatter.php
@@ -9,7 +9,7 @@
use Drupal\field\Annotation\FieldFormatter;
use Drupal\Core\Annotation\Translation;
-use Drupal\Core\Entity\Field\FieldInterface;
+use Drupal\Core\Entity\Field\FieldItemListInterface;
use Drupal\entity_reference\Plugin\field\formatter\EntityReferenceFormatterBase;
/**
@@ -31,7 +31,7 @@ class EntityReferenceTaxonomyTermRssFormatter extends EntityReferenceFormatterBa
/**
* Overrides Drupal\entity_reference\Plugin\field\formatter\EntityReferenceFormatterBase::viewElements().
*/
- public function viewElements(FieldInterface $items) {
+ public function viewElements(FieldItemListInterface $items) {
$elements = array();
$entity = $items->getEntity();
diff --git a/core/modules/taxonomy/lib/Drupal/taxonomy/Plugin/field/formatter/LinkFormatter.php b/core/modules/taxonomy/lib/Drupal/taxonomy/Plugin/field/formatter/LinkFormatter.php
index d72e089..60e79ef 100644
--- a/core/modules/taxonomy/lib/Drupal/taxonomy/Plugin/field/formatter/LinkFormatter.php
+++ b/core/modules/taxonomy/lib/Drupal/taxonomy/Plugin/field/formatter/LinkFormatter.php
@@ -9,7 +9,7 @@
use Drupal\field\Annotation\FieldFormatter;
use Drupal\Core\Annotation\Translation;
-use Drupal\Core\Entity\Field\FieldInterface;
+use Drupal\Core\Entity\Field\FieldItemListInterface;
use Drupal\taxonomy\Plugin\field\formatter\TaxonomyFormatterBase;
/**
@@ -28,7 +28,7 @@ class LinkFormatter extends TaxonomyFormatterBase {
/**
* {@inheritdoc}
*/
- public function viewElements(FieldInterface $items) {
+ public function viewElements(FieldItemListInterface $items) {
$elements = array();
// Terms without target_id do not exist yet, theme such terms as just their
diff --git a/core/modules/taxonomy/lib/Drupal/taxonomy/Plugin/field/formatter/PlainFormatter.php b/core/modules/taxonomy/lib/Drupal/taxonomy/Plugin/field/formatter/PlainFormatter.php
index 7facafc..d383ad0 100644
--- a/core/modules/taxonomy/lib/Drupal/taxonomy/Plugin/field/formatter/PlainFormatter.php
+++ b/core/modules/taxonomy/lib/Drupal/taxonomy/Plugin/field/formatter/PlainFormatter.php
@@ -9,7 +9,7 @@
use Drupal\field\Annotation\FieldFormatter;
use Drupal\Core\Annotation\Translation;
-use Drupal\Core\Entity\Field\FieldInterface;
+use Drupal\Core\Entity\Field\FieldItemListInterface;
use Drupal\taxonomy\Plugin\field\formatter\TaxonomyFormatterBase;
/**
@@ -28,7 +28,7 @@ class PlainFormatter extends TaxonomyFormatterBase {
/**
* {@inheritdoc}
*/
- public function viewElements(FieldInterface $items) {
+ public function viewElements(FieldItemListInterface $items) {
$elements = array();
foreach ($items as $delta => $item) {
diff --git a/core/modules/taxonomy/lib/Drupal/taxonomy/Plugin/field/formatter/RSSCategoryFormatter.php b/core/modules/taxonomy/lib/Drupal/taxonomy/Plugin/field/formatter/RSSCategoryFormatter.php
index ff6f321..6885c44 100644
--- a/core/modules/taxonomy/lib/Drupal/taxonomy/Plugin/field/formatter/RSSCategoryFormatter.php
+++ b/core/modules/taxonomy/lib/Drupal/taxonomy/Plugin/field/formatter/RSSCategoryFormatter.php
@@ -9,7 +9,7 @@
use Drupal\field\Annotation\FieldFormatter;
use Drupal\Core\Annotation\Translation;
-use Drupal\Core\Entity\Field\FieldInterface;
+use Drupal\Core\Entity\Field\FieldItemListInterface;
use Drupal\taxonomy\Plugin\field\formatter\TaxonomyFormatterBase;
/**
@@ -28,7 +28,7 @@ class RSSCategoryFormatter extends TaxonomyFormatterBase {
/**
* {@inheritdoc}
*/
- public function viewElements(FieldInterface $items) {
+ public function viewElements(FieldItemListInterface $items) {
$entity = $items->getEntity();
// Terms whose target_id is 'autocreate' do not exist yet and
diff --git a/core/modules/taxonomy/lib/Drupal/taxonomy/Plugin/field/formatter/TaxonomyFormatterBase.php b/core/modules/taxonomy/lib/Drupal/taxonomy/Plugin/field/formatter/TaxonomyFormatterBase.php
index 5cda29f..396aca8 100644
--- a/core/modules/taxonomy/lib/Drupal/taxonomy/Plugin/field/formatter/TaxonomyFormatterBase.php
+++ b/core/modules/taxonomy/lib/Drupal/taxonomy/Plugin/field/formatter/TaxonomyFormatterBase.php
@@ -9,7 +9,7 @@
use Drupal\field\Annotation\FieldFormatter;
use Drupal\Core\Annotation\Translation;
-use Drupal\Core\Entity\Field\FieldInterface;
+use Drupal\Core\Entity\Field\FieldItemListInterface;
use Drupal\field\Plugin\Type\Formatter\FormatterBase;
/**
diff --git a/core/modules/taxonomy/lib/Drupal/taxonomy/Plugin/field/widget/TaxonomyAutocompleteWidget.php b/core/modules/taxonomy/lib/Drupal/taxonomy/Plugin/field/widget/TaxonomyAutocompleteWidget.php
index df44efb..90d7b1d 100644
--- a/core/modules/taxonomy/lib/Drupal/taxonomy/Plugin/field/widget/TaxonomyAutocompleteWidget.php
+++ b/core/modules/taxonomy/lib/Drupal/taxonomy/Plugin/field/widget/TaxonomyAutocompleteWidget.php
@@ -9,7 +9,7 @@
use Drupal\field\Annotation\FieldWidget;
use Drupal\Core\Annotation\Translation;
-use Drupal\Core\Entity\Field\FieldInterface;
+use Drupal\Core\Entity\Field\FieldItemListInterface;
use Drupal\field\Plugin\Type\Widget\WidgetBase;
/**
@@ -65,7 +65,7 @@ public function settingsSummary() {
/**
* {@inheritdoc}
*/
- public function formElement(FieldInterface $items, $delta, array $element, array &$form, array &$form_state) {
+ public function formElement(FieldItemListInterface $items, $delta, array $element, array &$form, array &$form_state) {
$tags = array();
foreach ($items as $item) {
$tags[$item->target_id] = isset($item->taxonomy_term) ? $item->taxonomy_term : entity_load('taxonomy_term', $item->target_id);
diff --git a/core/modules/taxonomy/lib/Drupal/taxonomy/Tests/TaxonomyTermReferenceItemTest.php b/core/modules/taxonomy/lib/Drupal/taxonomy/Tests/TaxonomyTermReferenceItemTest.php
index c5e96f7..6c5f1ea 100644
--- a/core/modules/taxonomy/lib/Drupal/taxonomy/Tests/TaxonomyTermReferenceItemTest.php
+++ b/core/modules/taxonomy/lib/Drupal/taxonomy/Tests/TaxonomyTermReferenceItemTest.php
@@ -8,7 +8,7 @@
namespace Drupal\taxonomy\Tests;
use Drupal\Core\Language\Language;
-use Drupal\Core\Entity\Field\FieldInterface;
+use Drupal\Core\Entity\Field\FieldItemListInterface;
use Drupal\Core\Entity\Field\FieldItemInterface;
use Drupal\field\Tests\FieldUnitTestBase;
@@ -83,7 +83,7 @@ public function testTaxonomyTermReferenceItem() {
$entity->save();
$entity = entity_load('entity_test', $entity->id());
- $this->assertTrue($entity->field_test_taxonomy instanceof FieldInterface, 'Field implements interface.');
+ $this->assertTrue($entity->field_test_taxonomy instanceof FieldItemListInterface, 'Field implements interface.');
$this->assertTrue($entity->field_test_taxonomy[0] instanceof FieldItemInterface, 'Field item implements interface.');
$this->assertEqual($entity->field_test_taxonomy->target_id, $this->term->id());
$this->assertEqual($entity->field_test_taxonomy->entity->name->value, $this->term->name->value);
diff --git a/core/modules/telephone/lib/Drupal/telephone/Plugin/field/formatter/TelephoneLinkFormatter.php b/core/modules/telephone/lib/Drupal/telephone/Plugin/field/formatter/TelephoneLinkFormatter.php
index a6659da..bad13e0 100644
--- a/core/modules/telephone/lib/Drupal/telephone/Plugin/field/formatter/TelephoneLinkFormatter.php
+++ b/core/modules/telephone/lib/Drupal/telephone/Plugin/field/formatter/TelephoneLinkFormatter.php
@@ -10,7 +10,7 @@
use Drupal\field\Annotation\FieldFormatter;
use Drupal\Core\Annotation\Translation;
use Drupal\field\Plugin\Type\Formatter\FormatterBase;
-use Drupal\Core\Entity\Field\FieldInterface;
+use Drupal\Core\Entity\Field\FieldItemListInterface;
/**
* Plugin implementation of the 'telephone_link' formatter.
@@ -61,7 +61,7 @@ public function settingsSummary() {
/**
* {@inheritdoc}
*/
- public function viewElements(FieldInterface $items) {
+ public function viewElements(FieldItemListInterface $items) {
$element = array();
$title_setting = $this->getSetting('title');
diff --git a/core/modules/telephone/lib/Drupal/telephone/Plugin/field/widget/TelephoneDefaultWidget.php b/core/modules/telephone/lib/Drupal/telephone/Plugin/field/widget/TelephoneDefaultWidget.php
index 52ee467..4cf4f4a 100644
--- a/core/modules/telephone/lib/Drupal/telephone/Plugin/field/widget/TelephoneDefaultWidget.php
+++ b/core/modules/telephone/lib/Drupal/telephone/Plugin/field/widget/TelephoneDefaultWidget.php
@@ -9,7 +9,7 @@
use Drupal\field\Annotation\FieldWidget;
use Drupal\Core\Annotation\Translation;
-use Drupal\Core\Entity\Field\FieldInterface;
+use Drupal\Core\Entity\Field\FieldItemListInterface;
use Drupal\field\Plugin\Type\Widget\WidgetBase;
/**
@@ -62,7 +62,7 @@ public function settingsSummary() {
/**
* Implements \Drupal\field\Plugin\Type\Widget\WidgetInterface::formElement().
*/
- public function formElement(FieldInterface $items, $delta, array $element, array &$form, array &$form_state) {
+ public function formElement(FieldItemListInterface $items, $delta, array $element, array &$form, array &$form_state) {
$element['value'] = $element + array(
'#type' => 'tel',
'#default_value' => isset($items[$delta]->value) ? $items[$delta]->value : NULL,
diff --git a/core/modules/telephone/lib/Drupal/telephone/Tests/TelephoneItemTest.php b/core/modules/telephone/lib/Drupal/telephone/Tests/TelephoneItemTest.php
index 6049260..80b004f 100644
--- a/core/modules/telephone/lib/Drupal/telephone/Tests/TelephoneItemTest.php
+++ b/core/modules/telephone/lib/Drupal/telephone/Tests/TelephoneItemTest.php
@@ -7,7 +7,7 @@
namespace Drupal\telephone\Tests;
-use Drupal\Core\Entity\Field\FieldInterface;
+use Drupal\Core\Entity\Field\FieldItemListInterface;
use Drupal\Core\Entity\Field\FieldItemInterface;
use Drupal\field\Tests\FieldUnitTestBase;
@@ -61,7 +61,7 @@ public function testTestItem() {
// Verify entity has been created properly.
$id = $entity->id();
$entity = entity_load('entity_test', $id);
- $this->assertTrue($entity->field_test instanceof FieldInterface, 'Field implements interface.');
+ $this->assertTrue($entity->field_test instanceof FieldItemListInterface, 'Field implements interface.');
$this->assertTrue($entity->field_test[0] instanceof FieldItemInterface, 'Field item implements interface.');
$this->assertEqual($entity->field_test->value, $value);
$this->assertEqual($entity->field_test[0]->value, $value);
diff --git a/core/modules/text/lib/Drupal/text/Plugin/field/formatter/TextDefaultFormatter.php b/core/modules/text/lib/Drupal/text/Plugin/field/formatter/TextDefaultFormatter.php
index 41097bb..89ab7fc 100644
--- a/core/modules/text/lib/Drupal/text/Plugin/field/formatter/TextDefaultFormatter.php
+++ b/core/modules/text/lib/Drupal/text/Plugin/field/formatter/TextDefaultFormatter.php
@@ -10,7 +10,7 @@
use Drupal\field\Annotation\FieldFormatter;
use Drupal\Core\Annotation\Translation;
use Drupal\field\Plugin\Type\Formatter\FormatterBase;
-use Drupal\Core\Entity\Field\FieldInterface;
+use Drupal\Core\Entity\Field\FieldItemListInterface;
/**
* Plugin implementation of the 'text_default' formatter.
@@ -33,7 +33,7 @@ class TextDefaultFormatter extends FormatterBase {
/**
* {@inheritdoc}
*/
- public function viewElements(FieldInterface $items) {
+ public function viewElements(FieldItemListInterface $items) {
$elements = array();
foreach ($items as $delta => $item) {
diff --git a/core/modules/text/lib/Drupal/text/Plugin/field/formatter/TextPlainFormatter.php b/core/modules/text/lib/Drupal/text/Plugin/field/formatter/TextPlainFormatter.php
index 66597aa..caebc5b 100644
--- a/core/modules/text/lib/Drupal/text/Plugin/field/formatter/TextPlainFormatter.php
+++ b/core/modules/text/lib/Drupal/text/Plugin/field/formatter/TextPlainFormatter.php
@@ -10,7 +10,7 @@
use Drupal\field\Annotation\FieldFormatter;
use Drupal\Core\Annotation\Translation;
use Drupal\field\Plugin\Type\Formatter\FormatterBase;
-use Drupal\Core\Entity\Field\FieldInterface;
+use Drupal\Core\Entity\Field\FieldItemListInterface;
/**
* Plugin implementation of the 'text_plain' formatter.
@@ -33,7 +33,7 @@ class TextPlainFormatter extends FormatterBase {
/**
* Implements Drupal\field\Plugin\Type\Formatter\FormatterInterface::viewElements().
*/
- public function viewElements(FieldInterface $items) {
+ public function viewElements(FieldItemListInterface $items) {
$elements = array();
foreach ($items as $delta => $item) {
diff --git a/core/modules/text/lib/Drupal/text/Plugin/field/formatter/TextTrimmedFormatter.php b/core/modules/text/lib/Drupal/text/Plugin/field/formatter/TextTrimmedFormatter.php
index 71153cc..84a9e7e 100644
--- a/core/modules/text/lib/Drupal/text/Plugin/field/formatter/TextTrimmedFormatter.php
+++ b/core/modules/text/lib/Drupal/text/Plugin/field/formatter/TextTrimmedFormatter.php
@@ -10,7 +10,7 @@
use Drupal\field\Annotation\FieldFormatter;
use Drupal\Core\Annotation\Translation;
use Drupal\field\Plugin\Type\Formatter\FormatterBase;
-use Drupal\Core\Entity\Field\FieldInterface;
+use Drupal\Core\Entity\Field\FieldItemListInterface;
/**
* Plugin implementation of the 'text_trimmed'' formatter.
@@ -64,7 +64,7 @@ public function settingsSummary() {
/**
* {@inheritdoc}
*/
- public function viewElements(FieldInterface $items) {
+ public function viewElements(FieldItemListInterface $items) {
$elements = array();
$text_processing = $this->getFieldSetting('text_processing');
diff --git a/core/modules/text/lib/Drupal/text/Plugin/field/widget/TextareaWidget.php b/core/modules/text/lib/Drupal/text/Plugin/field/widget/TextareaWidget.php
index e764c60..67c6fb5 100644
--- a/core/modules/text/lib/Drupal/text/Plugin/field/widget/TextareaWidget.php
+++ b/core/modules/text/lib/Drupal/text/Plugin/field/widget/TextareaWidget.php
@@ -9,7 +9,7 @@
use Drupal\field\Annotation\FieldWidget;
use Drupal\Core\Annotation\Translation;
-use Drupal\Core\Entity\Field\FieldInterface;
+use Drupal\Core\Entity\Field\FieldItemListInterface;
use Drupal\field\Plugin\Type\Widget\WidgetBase;
use Symfony\Component\Validator\ConstraintViolationInterface;
@@ -68,7 +68,7 @@ public function settingsSummary() {
/**
* {@inheritdoc}
*/
- public function formElement(FieldInterface $items, $delta, array $element, array &$form, array &$form_state) {
+ public function formElement(FieldItemListInterface $items, $delta, array $element, array &$form, array &$form_state) {
$main_widget = $element + array(
'#type' => 'textarea',
'#default_value' => $items[$delta]->value,
diff --git a/core/modules/text/lib/Drupal/text/Plugin/field/widget/TextareaWithSummaryWidget.php b/core/modules/text/lib/Drupal/text/Plugin/field/widget/TextareaWithSummaryWidget.php
index 092b38f..2e1bdd3 100644
--- a/core/modules/text/lib/Drupal/text/Plugin/field/widget/TextareaWithSummaryWidget.php
+++ b/core/modules/text/lib/Drupal/text/Plugin/field/widget/TextareaWithSummaryWidget.php
@@ -10,7 +10,7 @@
use Drupal\field\Annotation\FieldWidget;
use Drupal\Core\Annotation\Translation;
use Symfony\Component\Validator\ConstraintViolationInterface;
-use Drupal\Core\Entity\Field\FieldInterface;
+use Drupal\Core\Entity\Field\FieldItemListInterface;
/**
* Plugin implementation of the 'text_textarea_with_summary' widget.
@@ -59,7 +59,7 @@ public function settingsSummary() {
/**
* {@inheritdoc}
*/
- function formElement(FieldInterface $items, $delta, array $element, array &$form, array &$form_state) {
+ function formElement(FieldItemListInterface $items, $delta, array $element, array &$form, array &$form_state) {
$element = parent::formElement($items, $delta, $element, $form, $form_state);
$display_summary = $items[$delta]->summary || $this->getFieldSetting('display_summary');
diff --git a/core/modules/text/lib/Drupal/text/Plugin/field/widget/TextfieldWidget.php b/core/modules/text/lib/Drupal/text/Plugin/field/widget/TextfieldWidget.php
index 06e61ad..bcc1031 100644
--- a/core/modules/text/lib/Drupal/text/Plugin/field/widget/TextfieldWidget.php
+++ b/core/modules/text/lib/Drupal/text/Plugin/field/widget/TextfieldWidget.php
@@ -9,7 +9,7 @@
use Drupal\field\Annotation\FieldWidget;
use Drupal\Core\Annotation\Translation;
-use Drupal\Core\Entity\Field\FieldInterface;
+use Drupal\Core\Entity\Field\FieldItemListInterface;
use Drupal\field\Plugin\Type\Widget\WidgetBase;
use Symfony\Component\Validator\ConstraintViolationInterface;
@@ -68,7 +68,7 @@ public function settingsSummary() {
/**
* {@inheritdoc}
*/
- public function formElement(FieldInterface $items, $delta, array $element, array &$form, array &$form_state) {
+ public function formElement(FieldItemListInterface $items, $delta, array $element, array &$form, array &$form_state) {
$main_widget = $element + array(
'#type' => 'textfield',
'#default_value' => isset($items[$delta]->value) ? $items[$delta]->value : NULL,
diff --git a/core/modules/text/lib/Drupal/text/Tests/TextWithSummaryItemTest.php b/core/modules/text/lib/Drupal/text/Tests/TextWithSummaryItemTest.php
index ef9a7df..82480a5 100644
--- a/core/modules/text/lib/Drupal/text/Tests/TextWithSummaryItemTest.php
+++ b/core/modules/text/lib/Drupal/text/Tests/TextWithSummaryItemTest.php
@@ -8,7 +8,7 @@
namespace Drupal\text\Tests;
use Drupal\Core\Language\Language;
-use Drupal\Core\Entity\Field\FieldInterface;
+use Drupal\Core\Entity\Field\FieldItemListInterface;
use Drupal\Core\Entity\Field\FieldItemInterface;
use Drupal\field\Tests\FieldUnitTestBase;
@@ -76,7 +76,7 @@ public function testCrudAndUpdate() {
$entity->save();
$entity = entity_load($entity_type, $entity->id());
- $this->assertTrue($entity->summary_field instanceof FieldInterface, 'Field implements interface.');
+ $this->assertTrue($entity->summary_field instanceof FieldItemListInterface, 'Field implements interface.');
$this->assertTrue($entity->summary_field[0] instanceof FieldItemInterface, 'Field item implements interface.');
$this->assertEqual($entity->summary_field->value, $value);
$this->assertEqual($entity->summary_field->processed, $value);