diff --git a/core/includes/entity.api.php b/core/includes/entity.api.php
index 8e60f00..8f15213 100644
--- a/core/includes/entity.api.php
+++ b/core/includes/entity.api.php
@@ -624,13 +624,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/lib/Drupal/Core/Entity/EntityInterface.php b/core/lib/Drupal/Core/Entity/EntityInterface.php
index 9d58820..44b8d9b 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
+ * 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 d0b6b4c..0311627 100644
--- a/core/lib/Drupal/Core/Entity/EntityNG.php
+++ b/core/lib/Drupal/Core/Entity/EntityNG.php
@@ -63,7 +63,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
*/
@@ -284,7 +284,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..b93cf3a 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 a particular 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/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 3a0734b..2ed3146 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;
@@ -27,7 +27,7 @@
*
* @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
@@ -141,49 +141,49 @@ public function setValue($values, $notify = TRUE) {
}
/**
- * Implements \Drupal\Core\Entity\Field\FieldInterface::getPropertyDefinition().
+ * Implements \Drupal\Core\Entity\Field\FieldItemListInterface::getPropertyDefinition().
*/
public function getPropertyDefinition($name) {
return $this->offsetGet(0)->getPropertyDefinition($name);
}
/**
- * Implements \Drupal\Core\Entity\Field\FieldInterface::getPropertyDefinitions().
+ * Implements \Drupal\Core\Entity\Field\FieldItemListInterface::getPropertyDefinitions().
*/
public function getPropertyDefinitions() {
return $this->offsetGet(0)->getPropertyDefinitions();
}
/**
- * Implements \Drupal\Core\Entity\Field\FieldInterface::__get().
+ * Implements \Drupal\Core\Entity\Field\FieldItemListInterface::__get().
*/
public function __get($property_name) {
return $this->offsetGet(0)->__get($property_name);
}
/**
- * Implements \Drupal\Core\Entity\Field\FieldInterface::get().
+ * Implements \Drupal\Core\Entity\Field\FieldItemListInterface::get().
*/
public function get($property_name) {
return $this->offsetGet(0)->get($property_name);
}
/**
- * Implements \Drupal\Core\Entity\Field\FieldInterface::__set().
+ * Implements \Drupal\Core\Entity\Field\FieldItemListInterface::__set().
*/
public function __set($property_name, $value) {
$this->offsetGet(0)->__set($property_name, $value);
}
/**
- * Implements \Drupal\Core\Entity\Field\FieldInterface::__isset().
+ * Implements \Drupal\Core\Entity\Field\FieldItemListInterface::__isset().
*/
public function __isset($property_name) {
return $this->offsetGet(0)->__isset($property_name);
}
/**
- * Implements \Drupal\Core\Entity\Field\FieldInterface::__unset().
+ * Implements \Drupal\Core\Entity\Field\FieldItemListInterface::__unset().
*/
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 80b0412..5c89c0b 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 {
/**
* Sets the langcode of the field values held in the object.
diff --git a/core/lib/Drupal/Core/Entity/Field/FieldTypePluginManager.php b/core/lib/Drupal/Core/Entity/Field/FieldTypePluginManager.php
index 0be215e..a170eb2 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 737409d..011673c 100644
--- a/core/lib/Drupal/Core/Entity/Plugin/DataType/UuidItem.php
+++ b/core/lib/Drupal/Core/Entity/Plugin/DataType/UuidItem.php
@@ -20,7 +20,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 610d474..c1a6cd1 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,42 +102,42 @@ 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;
/**
* Number of items to display in the feed’s block.
*
- * @var \Drupal\Core\Entity\Field\FieldInterface
+ * @var \Drupal\Core\Entity\Field\FieldItemListInterface
*/
public $block;
diff --git a/core/modules/aggregator/lib/Drupal/aggregator/Entity/Item.php b/core/modules/aggregator/lib/Drupal/aggregator/Entity/Item.php
index c24ad1e..d996840 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 698c39c..429a5a6 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 59c122b..f4f4f62 100644
--- a/core/modules/comment/lib/Drupal/comment/Entity/Comment.php
+++ b/core/modules/comment/lib/Drupal/comment/Entity/Comment.php
@@ -57,14 +57,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;
@@ -73,35 +73,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;
@@ -110,7 +110,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;
@@ -119,7 +119,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;
@@ -128,56 +128,56 @@ 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;
/**
* The comment 'new' marker for the current user.
*
- * @var \Drupal\Core\Entity\Field\FieldInterface
+ * @var \Drupal\Core\Entity\Field\FieldItemListInterface
*/
public $new;
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 a46e064..eb51074 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
@@ -14,7 +14,7 @@
use Drupal\Core\Entity\EntityInterface;
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;
@@ -95,7 +95,7 @@ public static function create(ContainerInterface $container, array $configuratio
/**
* {@inheritdoc}
*/
- public function viewElements(EntityInterface $entity, $langcode, FieldInterface $items) {
+ public function viewElements(EntityInterface $entity, $langcode, 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 2eefd13..c123159 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
@@ -11,7 +11,7 @@
use Drupal\Core\Annotation\Translation;
use Drupal\field\Plugin\Type\Formatter\FormatterBase;
use Drupal\Core\Entity\EntityInterface;
-use Drupal\Core\Entity\Field\FieldInterface;
+use Drupal\Core\Entity\Field\FieldItemListInterface;
use Drupal\Core\Datetime\DrupalDateTime;
/**
@@ -30,7 +30,7 @@ class DateTimePlainFormatter extends FormatterBase {
/**
* {@inheritdoc}
*/
- public function viewElements(EntityInterface $entity, $langcode, FieldInterface $items) {
+ public function viewElements(EntityInterface $entity, $langcode, 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 b208e36..28583c7 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
@@ -12,7 +12,7 @@
use Drupal\Component\Plugin\Discovery\DiscoveryInterface;
use Drupal\Core\Entity\EntityInterface;
use Drupal\Core\Entity\Field\FieldDefinitionInterface;
-use Drupal\Core\Entity\Field\FieldInterface;
+use Drupal\Core\Entity\Field\FieldItemListInterface;
use Drupal\field\Plugin\PluginSettingsBase;
use Drupal\field\FieldInstanceInterface;
use Drupal\Core\Datetime\DrupalDateTime;
@@ -62,7 +62,7 @@ public function defaultValueFunction() {
/**
* {@inheritdoc}
*/
- public function formElement(FieldInterface $items, $delta, array $element, $langcode, array &$form, array &$form_state) {
+ public function formElement(FieldItemListInterface $items, $delta, array $element, $langcode, 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 da550c7..c192e18 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
@@ -12,7 +12,7 @@
use Drupal\Component\Plugin\Discovery\DiscoveryInterface;
use Drupal\Core\Entity\EntityInterface;
use Drupal\Core\Entity\Field\FieldDefinitionInterface;
-use Drupal\Core\Entity\Field\FieldInterface;
+use Drupal\Core\Entity\Field\FieldItemListInterface;
use Drupal\field\Plugin\PluginSettingsBase;
use Drupal\field\FieldInstanceInterface;
use Drupal\Core\Datetime\DrupalDateTime;
@@ -66,7 +66,7 @@ public function defaultValueFunction() {
/**
* {@inheritdoc}
*/
- public function formElement(FieldInterface $items, $delta, array $element, $langcode, array &$form, array &$form_state) {
+ public function formElement(FieldItemListInterface $items, $delta, array $element, $langcode, 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 25e2945..19d19e0 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
@@ -11,7 +11,7 @@
use Drupal\Core\Annotation\Translation;
use Drupal\field\Plugin\Type\Formatter\FormatterBase;
use Drupal\Core\Entity\EntityInterface;
-use Drupal\Core\Entity\Field\FieldInterface;
+use Drupal\Core\Entity\Field\FieldItemListInterface;
/**
* Plugin implementation of the 'email_mailto' formatter.
@@ -29,7 +29,7 @@ class MailToFormatter extends FormatterBase {
/**
* Implements Drupal\field\Plugin\Type\Formatter\FormatterInterface::viewElements().
*/
- public function viewElements(EntityInterface $entity, $langcode, FieldInterface $items) {
+ public function viewElements(EntityInterface $entity, $langcode, 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 624697f..6d3cf88 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, $langcode, array &$form, array &$form_state) {
+ public function formElement(FieldItemListInterface $items, $delta, array $element, $langcode, 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 dd054f2..426b102 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
@@ -10,7 +10,7 @@
use Drupal\field\Annotation\FieldFormatter;
use Drupal\Core\Annotation\Translation;
use Drupal\Core\Entity\EntityInterface;
-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;
@@ -79,7 +79,7 @@ public function settingsSummary() {
/**
* {@inheritdoc}
*/
- public function viewElements(EntityInterface $entity, $langcode, FieldInterface $items) {
+ public function viewElements(EntityInterface $entity, $langcode, FieldItemListInterface $items) {
// Remove un-accessible items.
parent::viewElements($entity, $langcode, $items);
diff --git a/core/modules/entity_reference/lib/Drupal/entity_reference/Plugin/field/formatter/EntityReferenceFormatterBase.php b/core/modules/entity_reference/lib/Drupal/entity_reference/Plugin/field/formatter/EntityReferenceFormatterBase.php
index 98db38e..554af03 100644
--- a/core/modules/entity_reference/lib/Drupal/entity_reference/Plugin/field/formatter/EntityReferenceFormatterBase.php
+++ b/core/modules/entity_reference/lib/Drupal/entity_reference/Plugin/field/formatter/EntityReferenceFormatterBase.php
@@ -10,7 +10,7 @@
use Drupal\field\Annotation\FieldFormatter;
use Drupal\Core\Annotation\Translation;
use Drupal\Core\Entity\EntityInterface;
-use Drupal\Core\Entity\Field\FieldInterface;
+use Drupal\Core\Entity\Field\FieldItemListInterface;
use Drupal\field\Plugin\Type\Formatter\FormatterBase;
/**
@@ -100,7 +100,7 @@ public function prepareView(array $entities, $langcode, array $items) {
*
* @see \Drupal\entity_reference\Plugin\field\formatter\EntityReferenceFormatterBase::viewElements().
*/
- public function viewElements(EntityInterface $entity, $langcode, FieldInterface $items) {
+ public function viewElements(EntityInterface $entity, $langcode, FieldItemListInterface $items) {
// Remove un-accessible items.
foreach ($items as $delta => $item) {
if (empty($item->access)) {
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 f7402bf..37fc6f3 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
@@ -10,7 +10,7 @@
use Drupal\field\Annotation\FieldFormatter;
use Drupal\Core\Annotation\Translation;
use Drupal\Core\Entity\EntityInterface;
-use Drupal\Core\Entity\Field\FieldInterface;
+use Drupal\Core\Entity\Field\FieldItemListInterface;
use Drupal\entity_reference\Plugin\field\formatter\EntityReferenceFormatterBase;
/**
@@ -30,7 +30,7 @@ class EntityReferenceIdFormatter extends EntityReferenceFormatterBase {
/**
* Overrides \Drupal\entity_reference\Plugin\field\formatter\EntityReferenceFormatterBase::viewElements().
*/
- public function viewElements(EntityInterface $entity, $langcode, FieldInterface $items) {
+ public function viewElements(EntityInterface $entity, $langcode, 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 c63dfd6..694fa85 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
@@ -10,7 +10,7 @@
use Drupal\field\Annotation\FieldFormatter;
use Drupal\Core\Annotation\Translation;
use Drupal\Core\Entity\EntityInterface;
-use Drupal\Core\Entity\Field\FieldInterface;
+use Drupal\Core\Entity\Field\FieldItemListInterface;
use Drupal\entity_reference\Plugin\field\formatter\EntityReferenceFormatterBase;
/**
@@ -55,7 +55,7 @@ public function settingsSummary() {
/**
* {@inheritdoc}
*/
- public function viewElements(EntityInterface $entity, $langcode, FieldInterface $items) {
+ public function viewElements(EntityInterface $entity, $langcode, FieldItemListInterface $items) {
// Remove un-accessible items.
parent::viewElements($entity, $langcode, $items);
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 fb2b575..791f836 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, $langcode, array &$form, array &$form_state) {
+ public function formElement(FieldItemListInterface $items, $delta, array $element, $langcode, 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 3587046..0dd3790 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, $langcode, array &$form, array &$form_state) {
+ public function formElement(FieldItemListInterface $items, $delta, array $element, $langcode, array &$form, array &$form_state) {
global $user;
$entity = $element['#entity'];
@@ -116,7 +116,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.install b/core/modules/field/field.install
index 387f4d8..6ced11a 100644
--- a/core/modules/field/field.install
+++ b/core/modules/field/field.install
@@ -21,7 +21,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 e38f57f..95e6e4d 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 95%
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 eb2e4db..fcda666 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 2936b47..0e83bea 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 aa93124..a5e7a0c 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
@@ -9,7 +9,7 @@
use Drupal\Core\Entity\EntityInterface;
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;
@@ -74,7 +74,7 @@ public function __construct($plugin_id, array $plugin_definition, FieldDefinitio
/**
* {@inheritdoc}
*/
- public function view(EntityInterface $entity, $langcode, FieldInterface $items) {
+ public function view(EntityInterface $entity, $langcode, FieldItemListInterface $items) {
$addition = array();
$elements = $this->viewElements($entity, $langcode, $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 70bc59a..24e804c 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
@@ -8,7 +8,7 @@
namespace Drupal\field\Plugin\Type\Formatter;
use Drupal\Core\Entity\EntityInterface;
-use Drupal\Core\Entity\Field\FieldInterface;
+use Drupal\Core\Entity\Field\FieldItemListInterface;
use Drupal\field\Plugin\PluginSettingsInterface;
/**
@@ -84,7 +84,7 @@ public function prepareView(array $entities, $langcode, array $items);
* @return array
* A renderable array for a themed field with its label and all its values.
*/
- public function view(EntityInterface $entity, $langcode, FieldInterface $items);
+ public function view(EntityInterface $entity, $langcode, FieldItemListInterface $items);
/**
* Builds a renderable array for a field value.
@@ -100,6 +100,6 @@ public function view(EntityInterface $entity, $langcode, FieldInterface $items);
* A renderable array for $items, as an array of child elements keyed by
* numeric indexes starting from 0.
*/
- public function viewElements(EntityInterface $entity, $langcode, FieldInterface $items);
+ public function viewElements(EntityInterface $entity, $langcode, 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 4cf4556..95f0ff0 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
@@ -10,7 +10,7 @@
use Drupal\Component\Utility\NestedArray;
use Drupal\Core\Entity\EntityInterface;
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;
@@ -56,7 +56,7 @@ public function __construct($plugin_id, array $plugin_definition, FieldDefinitio
/**
* {@inheritdoc}
*/
- public function form(EntityInterface $entity, $langcode, FieldInterface $items, array &$form, array &$form_state, $get_delta = NULL) {
+ public function form(EntityInterface $entity, $langcode, FieldItemListInterface $items, array &$form, array &$form_state, $get_delta = NULL) {
$field_name = $this->fieldDefinition->getFieldName();
$parents = $form['#parents'];
@@ -151,7 +151,7 @@ public function form(EntityInterface $entity, $langcode, FieldInterface $items,
* - AHAH-'add more' button
* - table display and drag-n-drop value reordering
*/
- protected function formMultipleElements(EntityInterface $entity, FieldInterface $items, $langcode, array &$form, array &$form_state) {
+ protected function formMultipleElements(EntityInterface $entity, FieldItemListInterface $items, $langcode, array &$form, array &$form_state) {
$field_name = $this->fieldDefinition->getFieldName();
$cardinality = $this->fieldDefinition->getFieldCardinality();
$parents = $form['#parents'];
@@ -244,7 +244,7 @@ protected function formMultipleElements(EntityInterface $entity, FieldInterface
/**
* Generates the form element for a single copy of the widget.
*/
- protected function formSingleElement(EntityInterface $entity, FieldInterface $items, $delta, $langcode, array $element, array &$form, array &$form_state) {
+ protected function formSingleElement(EntityInterface $entity, FieldItemListInterface $items, $delta, $langcode, array $element, array &$form, array &$form_state) {
$element += array(
'#entity_type' => $entity->entityType(),
'#bundle' => $entity->bundle(),
@@ -281,7 +281,7 @@ protected function formSingleElement(EntityInterface $entity, FieldInterface $it
/**
* {@inheritdoc}
*/
- public function extractFormValues(EntityInterface $entity, $langcode, FieldInterface $items, array $form, array &$form_state) {
+ public function extractFormValues(EntityInterface $entity, $langcode, FieldItemListInterface $items, array $form, array &$form_state) {
$field_name = $this->fieldDefinition->getFieldName();
// Extract the values from $form_state['values'].
@@ -334,7 +334,7 @@ public function extractFormValues(EntityInterface $entity, $langcode, FieldInter
/**
* {@inheritdoc}
*/
- public function flagErrors(EntityInterface $entity, $langcode, FieldInterface $items, array $form, array &$form_state) {
+ public function flagErrors(EntityInterface $entity, $langcode, FieldItemListInterface $items, array $form, array &$form_state) {
$field_name = $this->fieldDefinition->getFieldName();
$field_state = field_form_get_state($form['#parents'], $field_name, $langcode, $form_state);
@@ -413,10 +413,10 @@ public function massageFormValues(array $values, array $form, array &$form_state
/**
* Sorts submitted field values according to drag-n-drop reordering.
*
- * @param FieldInterface $items
+ * @param 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 ac8c60b..ef1e94d 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
@@ -8,7 +8,7 @@
namespace Drupal\field\Plugin\Type\Widget;
use Drupal\Core\Entity\EntityInterface;
-use Drupal\Core\Entity\Field\FieldInterface;
+use Drupal\Core\Entity\Field\FieldItemListInterface;
use Drupal\field\Plugin\PluginSettingsInterface;
/**
@@ -32,7 +32,7 @@
* The entity for which the widget is being built.
* @param string $langcode
* The language associated with the field.
- * @param FieldInterface $items
+ * @param 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
@@ -46,7 +46,7 @@
* @return array
* The form element array created for this field.
*/
- public function form(EntityInterface $entity, $langcode, FieldInterface $items, array &$form, array &$form_state, $get_delta = NULL);
+ public function form(EntityInterface $entity, $langcode, FieldItemListInterface $items, array &$form, array &$form_state, $get_delta = NULL);
/**
* Extracts field values from submitted form values.
@@ -55,7 +55,7 @@ public function form(EntityInterface $entity, $langcode, FieldInterface $items,
* The entity for which the widget is being submitted.
* @param string $langcode
* The language associated to $items.
- * @param FieldInterface $items
+ * @param FieldItemListInterface $items
* The field values. This parameter is altered by reference to receive the
* incoming form values.
* @param array $form
@@ -64,7 +64,7 @@ public function form(EntityInterface $entity, $langcode, FieldInterface $items,
* @param array $form_state
* The form state.
*/
- public function extractFormValues(EntityInterface $entity, $langcode, FieldInterface $items, array $form, array &$form_state);
+ public function extractFormValues(EntityInterface $entity, $langcode, FieldItemListInterface $items, array $form, array &$form_state);
/**
* Reports field-level validation errors against actual form elements.
@@ -73,7 +73,7 @@ public function extractFormValues(EntityInterface $entity, $langcode, FieldInter
* The entity for which the widget is being submitted.
* @param string $langcode
* The language associated to $items.
- * @param FieldInterface $items
+ * @param FieldItemListInterface $items
* The field values.
* @param array $form
* The form structure where field elements are attached to. This might be a
@@ -81,6 +81,6 @@ public function extractFormValues(EntityInterface $entity, $langcode, FieldInter
* @param array $form_state
* The form state.
*/
- public function flagErrors(EntityInterface $entity, $langcode, FieldInterface $items, array $form, array &$form_state);
+ public function flagErrors(EntityInterface $entity, $langcode, 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 e27484e..de3e26b 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
@@ -10,7 +10,7 @@
use Drupal\Core\Entity\EntityInterface;
use Drupal\field\Entity\FieldInstance;
use Symfony\Component\Validator\ConstraintViolationInterface;
-use Drupal\Core\Entity\Field\FieldInterface;
+use Drupal\Core\Entity\Field\FieldItemListInterface;
/**
* Interface definition for field widget plugins.
@@ -75,7 +75,7 @@ public function settingsSummary();
* definition and set them as ad-hoc $element['#custom'] properties, for later
* use by its element callbacks.
*
- * @param FieldInterface $items
+ * @param 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).
@@ -115,7 +115,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, $langcode, array &$form, array &$form_state);
+ public function formElement(FieldItemListInterface $items, $delta, array $element, $langcode, 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 93%
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 ce171ba..47c5abf 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,13 +2,13 @@
/**
* @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\Core\Entity\EntityInterface;
-use Drupal\field\Plugin\Type\FieldType\ConfigField;
+use Drupal\field\Plugin\Type\FieldType\ConfigFieldItemList;
use Drupal\field\FieldInstanceInterface;
use Symfony\Component\Validator\ConstraintViolation;
@@ -25,7 +25,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}
@@ -137,7 +137,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 78e6010..409718e 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, $langcode, array &$form, array &$form_state) {
+ public function formElement(FieldItemListInterface $items, $delta, array $element, $langcode, 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 a54b2c3..3db7926 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
@@ -11,7 +11,7 @@
use Drupal\Core\Annotation\Translation;
use Drupal\field\Plugin\Type\Formatter\FormatterBase;
use Drupal\Core\Entity\EntityInterface;
-use Drupal\Core\Entity\Field\FieldInterface;
+use Drupal\Core\Entity\Field\FieldItemListInterface;
/**
* Plugin implementation of the 'field_test_default' formatter.
@@ -56,7 +56,7 @@ public function settingsSummary() {
/**
* {@inheritdoc}
*/
- public function viewElements(EntityInterface $entity, $langcode, FieldInterface $items) {
+ public function viewElements(EntityInterface $entity, $langcode, 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 b8e455c..cb385d0 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
@@ -10,7 +10,7 @@
use Drupal\field\Annotation\FieldFormatter;
use Drupal\Core\Annotation\Translation;
use Drupal\Core\Entity\EntityInterface;
-use Drupal\Core\Entity\Field\FieldInterface;
+use Drupal\Core\Entity\Field\FieldItemListInterface;
use Drupal\field\Plugin\Type\Formatter\FormatterBase;
/**
@@ -44,7 +44,7 @@ public function prepareView(array $entities, $langcode, array $items) {
/**
* {@inheritdoc}
*/
- public function viewElements(EntityInterface $entity, $langcode, FieldInterface $items) {
+ public function viewElements(EntityInterface $entity, $langcode, FieldItemListInterface $items) {
$elements = array();
if (!empty($items)) {
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 5b0b63b..0e11452 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
@@ -11,7 +11,7 @@
use Drupal\Core\Annotation\Translation;
use Drupal\field\Plugin\Type\Formatter\FormatterBase;
use Drupal\Core\Entity\EntityInterface;
-use Drupal\Core\Entity\Field\FieldInterface;
+use Drupal\Core\Entity\Field\FieldItemListInterface;
/**
* Plugin implementation of the 'field_test_multiple' formatter.
@@ -56,7 +56,7 @@ public function settingsSummary() {
/**
* {@inheritdoc}
*/
- public function viewElements(EntityInterface $entity, $langcode, FieldInterface $items) {
+ public function viewElements(EntityInterface $entity, $langcode, 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 946797a..1a2e963 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
@@ -11,7 +11,7 @@
use Drupal\Core\Annotation\Translation;
use Drupal\field\Plugin\Type\Formatter\FormatterBase;
use Drupal\Core\Entity\EntityInterface;
-use Drupal\Core\Entity\Field\FieldInterface;
+use Drupal\Core\Entity\Field\FieldItemListInterface;
/**
* Plugin implementation of the 'field_test_with_prepare_view' formatter.
@@ -70,7 +70,7 @@ public function prepareView(array $entities, $langcode, array $items) {
/**
* {@inheritdoc}
*/
- public function viewElements(EntityInterface $entity, $langcode, FieldInterface $items) {
+ public function viewElements(EntityInterface $entity, $langcode, 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 ff3c593..8b8c2c4 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, $langcode, array &$form, array &$form_state) {
+ public function formElement(FieldItemListInterface $items, $delta, array $element, $langcode, 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 86d7dde..8ebba2b 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, $langcode, array &$form, array &$form_state) {
+ public function formElement(FieldItemListInterface $items, $delta, array $element, $langcode, 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 18e7f17..4764d27 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/file.field.inc b/core/modules/file/file.field.inc
index a40a44b..aaad4a1 100644
--- a/core/modules/file/file.field.inc
+++ b/core/modules/file/file.field.inc
@@ -30,7 +30,7 @@ function file_field_info() {
'default_widget' => 'file_generic',
'default_formatter' => 'file_default',
'class' => '\Drupal\file\Type\FileItem',
- 'list_class' => '\Drupal\file\Type\FileField',
+ 'list_class' => '\Drupal\file\Type\FileFieldItemList',
),
);
}
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 abf6e92..e546f83 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
@@ -10,7 +10,7 @@
use Drupal\field\Annotation\FieldFormatter;
use Drupal\Core\Annotation\Translation;
use Drupal\Core\Entity\EntityInterface;
-use Drupal\Core\Entity\Field\FieldInterface;
+use Drupal\Core\Entity\Field\FieldItemListInterface;
/**
* Plugin implementation of the 'file_default' formatter.
@@ -28,7 +28,7 @@ class GenericFileFormatter extends FileFormatterBase {
/**
* Implements \Drupal\field\Plugin\Type\Formatter\FormatterInterface::viewElements().
*/
- public function viewElements(EntityInterface $entity, $langcode, FieldInterface $items) {
+ public function viewElements(EntityInterface $entity, $langcode, 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 d18234f..ff58b0d 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
@@ -10,7 +10,7 @@
use Drupal\field\Annotation\FieldFormatter;
use Drupal\Core\Annotation\Translation;
use Drupal\Core\Entity\EntityInterface;
-use Drupal\Core\Entity\Field\FieldInterface;
+use Drupal\Core\Entity\Field\FieldItemListInterface;
/**
* Plugin implementation of the 'file_rss_enclosure' formatter.
@@ -28,7 +28,7 @@ class RSSEnclosureFormatter extends FileFormatterBase {
/**
* Implements \Drupal\field\Plugin\Type\Formatter\FormatterInterface::viewElements().
*/
- public function viewElements(EntityInterface $entity, $langcode, FieldInterface $items) {
+ public function viewElements(EntityInterface $entity, $langcode, FieldItemListInterface $items) {
// 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 dfe8f43..1a2e560 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
@@ -10,7 +10,7 @@
use Drupal\field\Annotation\FieldFormatter;
use Drupal\Core\Annotation\Translation;
use Drupal\Core\Entity\EntityInterface;
-use Drupal\Core\Entity\Field\FieldInterface;
+use Drupal\Core\Entity\Field\FieldItemListInterface;
/**
* Plugin implementation of the 'file_table' formatter.
@@ -28,7 +28,7 @@ class TableFormatter extends FileFormatterBase {
/**
* Implements \Drupal\field\Plugin\Type\Formatter\FormatterInterface::viewElements().
*/
- public function viewElements(EntityInterface $entity, $langcode, FieldInterface $items) {
+ public function viewElements(EntityInterface $entity, $langcode, 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 9138a07..de20ae3 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
@@ -10,7 +10,7 @@
use Drupal\field\Annotation\FieldFormatter;
use Drupal\Core\Annotation\Translation;
use Drupal\Core\Entity\EntityInterface;
-use Drupal\Core\Entity\Field\FieldInterface;
+use Drupal\Core\Entity\Field\FieldItemListInterface;
/**
* Plugin implementation of the 'file_url_plain' formatter.
@@ -28,7 +28,7 @@ class UrlPlainFormatter extends FileFormatterBase {
/**
* Implements \Drupal\field\Plugin\Type\Formatter\FormatterInterface::viewElements().
*/
- public function viewElements(EntityInterface $entity, $langcode, FieldInterface $items) {
+ public function viewElements(EntityInterface $entity, $langcode, 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 1e12c5b..ab8eb2b 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
@@ -11,7 +11,7 @@
use Drupal\Core\Annotation\Translation;
use Drupal\field\Plugin\Type\Widget\WidgetBase;
use Drupal\Core\Entity\EntityInterface;
-use Drupal\Core\Entity\Field\FieldInterface;
+use Drupal\Core\Entity\Field\FieldItemListInterface;
/**
* Plugin implementation of the 'file_generic' widget.
@@ -62,7 +62,7 @@ public function settingsSummary() {
*
* Special handling for draggable multiple widgets and 'add more' button.
*/
- protected function formMultipleElements(EntityInterface $entity, FieldInterface $items, $langcode, array &$form, array &$form_state) {
+ protected function formMultipleElements(EntityInterface $entity, FieldItemListInterface $items, $langcode, array &$form, array &$form_state) {
$field_name = $this->fieldDefinition->getFieldName();
$parents = $form['#parents'];
@@ -174,7 +174,7 @@ protected function formMultipleElements(EntityInterface $entity, FieldInterface
/**
* {@inheritdoc}
*/
- public function formElement(FieldInterface $items, $delta, array $element, $langcode, array &$form, array &$form_state) {
+ public function formElement(FieldItemListInterface $items, $delta, array $element, $langcode, 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/file/lib/Drupal/file/Type/FileField.php b/core/modules/file/lib/Drupal/file/Type/FileFieldItemList.php
similarity index 55%
rename from core/modules/file/lib/Drupal/file/Type/FileField.php
rename to core/modules/file/lib/Drupal/file/Type/FileFieldItemList.php
index 3666238..777145e 100644
--- a/core/modules/file/lib/Drupal/file/Type/FileField.php
+++ b/core/modules/file/lib/Drupal/file/Type/FileFieldItemList.php
@@ -2,17 +2,17 @@
/**
* @file
- * Contains \Drupal\file\Type\FileField.
+ * Contains \Drupal\file\Type\FileFieldItemList.
*/
namespace Drupal\file\Type;
-use Drupal\field\Plugin\field\field_type\LegacyConfigField;
+use Drupal\field\Plugin\field\field_type\LegacyConfigFieldItemList;
/**
* Represents a configurable entity file field.
*/
-class FileField extends LegacyConfigField {
+class FileFieldItemList extends LegacyConfigFieldItemList {
/**
* {@inheritdoc}
diff --git a/core/modules/hal/lib/Drupal/hal/Normalizer/FieldNormalizer.php b/core/modules/hal/lib/Drupal/hal/Normalizer/FieldNormalizer.php
index 725fca3..aa15cfd 100644
--- a/core/modules/hal/lib/Drupal/hal/Normalizer/FieldNormalizer.php
+++ b/core/modules/hal/lib/Drupal/hal/Normalizer/FieldNormalizer.php
@@ -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/image.field.inc b/core/modules/image/image.field.inc
index c682747..0e3c69c 100644
--- a/core/modules/image/image.field.inc
+++ b/core/modules/image/image.field.inc
@@ -49,7 +49,7 @@ function image_field_info() {
'default_widget' => 'image_image',
'default_formatter' => 'image',
'class' => '\Drupal\image\Type\ImageItem',
- 'list_class' => '\Drupal\image\Type\ImageField',
+ 'list_class' => '\Drupal\image\Type\ImageFieldItemList',
),
);
}
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 32c82ad..2091233 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
@@ -10,7 +10,7 @@
use Drupal\field\Annotation\FieldFormatter;
use Drupal\Core\Annotation\Translation;
use Drupal\Core\Entity\EntityInterface;
-use Drupal\Core\Entity\Field\FieldInterface;
+use Drupal\Core\Entity\Field\FieldItemListInterface;
/**
* Plugin implementation of the 'image' formatter.
@@ -92,7 +92,7 @@ public function settingsSummary() {
/**
* {@inheritdoc}
*/
- public function viewElements(EntityInterface $entity, $langcode, FieldInterface $items) {
+ public function viewElements(EntityInterface $entity, $langcode, 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 82cb4ad..e421c01 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
@@ -11,7 +11,7 @@
use Drupal\Core\Annotation\Translation;
use Drupal\file\Plugin\field\widget\FileWidget;
use Drupal\Core\Entity\EntityInterface;
-use Drupal\Core\Entity\Field\FieldInterface;
+use Drupal\Core\Entity\Field\FieldItemListInterface;
/**
* Plugin implementation of the 'image_image' widget.
@@ -78,7 +78,7 @@ public function settingsSummary() {
*
* Special handling for draggable multiple widgets and 'add more' button.
*/
- protected function formMultipleElements(EntityInterface $entity, FieldInterface $items, $langcode, array &$form, array &$form_state) {
+ protected function formMultipleElements(EntityInterface $entity, FieldItemListInterface $items, $langcode, array &$form, array &$form_state) {
$elements = parent::formMultipleElements($entity, $items, $langcode, $form, $form_state);
$cardinality = $this->fieldDefinition->getFieldCardinality();
@@ -104,7 +104,7 @@ protected function formMultipleElements(EntityInterface $entity, FieldInterface
/**
* {@inheritdoc}
*/
- public function formElement(FieldInterface $items, $delta, array $element, $langcode, array &$form, array &$form_state) {
+ public function formElement(FieldItemListInterface $items, $delta, array $element, $langcode, array &$form, array &$form_state) {
$element = parent::formElement($items, $delta, $element, $langcode, $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/image/lib/Drupal/image/Type/ImageField.php b/core/modules/image/lib/Drupal/image/Type/ImageFieldItemList.php
similarity index 55%
rename from core/modules/image/lib/Drupal/image/Type/ImageField.php
rename to core/modules/image/lib/Drupal/image/Type/ImageFieldItemList.php
index aea434b..fafd270 100644
--- a/core/modules/image/lib/Drupal/image/Type/ImageField.php
+++ b/core/modules/image/lib/Drupal/image/Type/ImageFieldItemList.php
@@ -2,17 +2,17 @@
/**
* @file
- * Contains \Drupal\image\Type\ImageField.
+ * Contains \Drupal\image\Type\ImageFieldItemList.
*/
namespace Drupal\image\Type;
-use Drupal\field\Plugin\field\field_type\LegacyConfigField;
+use Drupal\field\Plugin\field\field_type\LegacyConfigFieldItemList;
/**
* Represents a configurable entity image field.
*/
-class ImageField extends LegacyConfigField {
+class ImageFieldItemList extends LegacyConfigFieldItemList {
/**
* {@inheritdoc}
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 29e7eb9..32cb5b5 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
@@ -11,7 +11,7 @@
use Drupal\Core\Annotation\Translation;
use Drupal\Component\Utility\Url;
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\field\Plugin\Type\Formatter\FormatterBase;
@@ -117,7 +117,7 @@ public function settingsSummary() {
/**
* {@inheritdoc}
*/
- public function viewElements(EntityInterface $entity, $langcode, FieldInterface $items) {
+ public function viewElements(EntityInterface $entity, $langcode, FieldItemListInterface $items) {
$element = array();
$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 f249bbe..d62b73e 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
@@ -15,7 +15,7 @@
use Drupal\field\Annotation\FieldFormatter;
use Drupal\Core\Annotation\Translation;
use Drupal\Core\Entity\EntityInterface;
-use Drupal\Core\Entity\Field\FieldInterface;
+use Drupal\Core\Entity\Field\FieldItemListInterface;
/**
* Plugin implementation of the 'link_separate' formatter.
@@ -38,7 +38,7 @@ class LinkSeparateFormatter extends LinkFormatter {
/**
* {@inheritdoc}
*/
- public function viewElements(EntityInterface $entity, $langcode, FieldInterface $items) {
+ public function viewElements(EntityInterface $entity, $langcode, FieldItemListInterface $items) {
$element = array();
$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 fc37e35..d02ceb5 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, $langcode, array &$form, array &$form_state) {
+ public function formElement(FieldItemListInterface $items, $delta, array $element, $langcode, 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 c639a25..e7275b0 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
@@ -11,7 +11,7 @@
use Drupal\Core\Annotation\Translation;
use Drupal\field\Plugin\Type\Formatter\FormatterBase;
use Drupal\Core\Entity\EntityInterface;
-use Drupal\Core\Entity\Field\FieldInterface;
+use Drupal\Core\Entity\Field\FieldItemListInterface;
/**
* Parent plugin for decimal and integer formatters
@@ -65,7 +65,7 @@ public function settingsSummary() {
/**
* {@inheritdoc}
*/
- public function viewElements(EntityInterface $entity, $langcode, FieldInterface $items) {
+ public function viewElements(EntityInterface $entity, $langcode, 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 75b6d6d..e748bbd 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
@@ -11,7 +11,7 @@
use Drupal\Core\Annotation\Translation;
use Drupal\field\Plugin\Type\Formatter\FormatterBase;
use Drupal\Core\Entity\EntityInterface;
-use Drupal\Core\Entity\Field\FieldInterface;
+use Drupal\Core\Entity\Field\FieldItemListInterface;
/**
* Plugin implementation of the 'number_unformatted' formatter.
@@ -31,7 +31,7 @@ class NumberUnformattedFormatter extends FormatterBase {
/**
* Implements Drupal\field\Plugin\Type\Formatter\FormatterInterface::viewElements().
*/
- public function viewElements(EntityInterface $entity, $langcode, FieldInterface $items) {
+ public function viewElements(EntityInterface $entity, $langcode, 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 c27909e..e66ed7c 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, $langcode, array &$form, array &$form_state) {
+ public function formElement(FieldItemListInterface $items, $delta, array $element, $langcode, 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 312a164..950e617 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
@@ -11,7 +11,7 @@
use Drupal\Core\Annotation\Translation;
use Drupal\field\Plugin\Type\Formatter\FormatterBase;
use Drupal\Core\Entity\EntityInterface;
-use Drupal\Core\Entity\Field\FieldInterface;
+use Drupal\Core\Entity\Field\FieldItemListInterface;
/**
* Plugin implementation of the 'list_default' formatter.
@@ -32,7 +32,7 @@ class OptionsDefaultFormatter extends FormatterBase {
/**
* {@inheritdoc}
*/
- public function viewElements(EntityInterface $entity, $langcode, FieldInterface $items) {
+ public function viewElements(EntityInterface $entity, $langcode, FieldItemListInterface $items) {
$elements = array();
$allowed_values = options_allowed_values($this->fieldDefinition, $entity);
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 af0fff1..db97339 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
@@ -11,7 +11,7 @@
use Drupal\Core\Annotation\Translation;
use Drupal\field\Plugin\Type\Formatter\FormatterBase;
use Drupal\Core\Entity\EntityInterface;
-use Drupal\Core\Entity\Field\FieldInterface;
+use Drupal\Core\Entity\Field\FieldItemListInterface;
/**
* Plugin implementation of the 'list_key' formatter.
@@ -32,7 +32,7 @@ class OptionsKeyFormatter extends FormatterBase {
/**
* {@inheritdoc}
*/
- public function viewElements(EntityInterface $entity, $langcode, FieldInterface $items) {
+ public function viewElements(EntityInterface $entity, $langcode, 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 bee3e3b..ce909b3 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, $langcode, array &$form, array &$form_state) {
+ public function formElement(FieldItemListInterface $items, $delta, array $element, $langcode, array &$form, array &$form_state) {
$element = parent::formElement($items, $delta, $element, $langcode, $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 50cc08a..f91f944 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, $langcode, array &$form, array &$form_state) {
+ public function formElement(FieldItemListInterface $items, $delta, array $element, $langcode, array &$form, array &$form_state) {
$element = parent::formElement($items, $delta, $element, $langcode, $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 f218438..4941073 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, $langcode, array &$form, array &$form_state) {
+ public function formElement(FieldItemListInterface $items, $delta, array $element, $langcode, 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 FieldInterface $items
+ * @param 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 26fcbaf..5723068 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, $langcode, array &$form, array &$form_state) {
+ public function formElement(FieldItemListInterface $items, $delta, array $element, $langcode, array &$form, array &$form_state) {
$element = parent::formElement($items, $delta, $element, $langcode, $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 9cfe0a8..5ac61c6 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
@@ -10,7 +10,7 @@
use Drupal\field\Annotation\FieldFormatter;
use Drupal\Core\Annotation\Translation;
use Drupal\Core\Entity\EntityInterface;
-use Drupal\Core\Entity\Field\FieldInterface;
+use Drupal\Core\Entity\Field\FieldItemListInterface;
use Drupal\image\Plugin\field\formatter\ImageFormatterBase;
/**
@@ -115,7 +115,7 @@ public function settingsSummary() {
/**
* {@inheritdoc}
*/
- public function viewElements(EntityInterface $entity, $langcode, FieldInterface $items) {
+ public function viewElements(EntityInterface $entity, $langcode, FieldItemListInterface $items) {
$elements = array();
// Check if the formatter involves a link.
if ($this->getSetting('image_link') == 'content') {
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 12de782..9e28741 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)));
@@ -428,7 +428,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 eab31a8c..d34019a 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 da83581..e0756fa 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 cf306ad..a3d4973 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
@@ -10,7 +10,7 @@
use Drupal\field\Annotation\FieldFormatter;
use Drupal\Core\Annotation\Translation;
use Drupal\Core\Entity\EntityInterface;
-use Drupal\Core\Entity\Field\FieldInterface;
+use Drupal\Core\Entity\Field\FieldItemListInterface;
use Drupal\entity_reference\Plugin\field\formatter\EntityReferenceFormatterBase;
/**
@@ -32,7 +32,7 @@ class EntityReferenceTaxonomyTermRssFormatter extends EntityReferenceFormatterBa
/**
* Overrides Drupal\entity_reference\Plugin\field\formatter\EntityReferenceFormatterBase::viewElements().
*/
- public function viewElements(EntityInterface $entity, $langcode, FieldInterface $items) {
+ public function viewElements(EntityInterface $entity, $langcode, FieldItemListInterface $items) {
$elements = array();
foreach ($items as $item) {
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 6ce9e53..10874ea 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
@@ -10,7 +10,7 @@
use Drupal\field\Annotation\FieldFormatter;
use Drupal\Core\Annotation\Translation;
use Drupal\Core\Entity\EntityInterface;
-use Drupal\Core\Entity\Field\FieldInterface;
+use Drupal\Core\Entity\Field\FieldItemListInterface;
use Drupal\field\Plugin\Type\Formatter\FormatterBase;
use Drupal\taxonomy\Plugin\field\formatter\TaxonomyFormatterBase;
@@ -30,7 +30,7 @@ class LinkFormatter extends TaxonomyFormatterBase {
/**
* {@inheritdoc}
*/
- public function viewElements(EntityInterface $entity, $langcode, FieldInterface $items) {
+ public function viewElements(EntityInterface $entity, $langcode, 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 36de426..dfa21cd 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
@@ -10,7 +10,7 @@
use Drupal\field\Annotation\FieldFormatter;
use Drupal\Core\Annotation\Translation;
use Drupal\Core\Entity\EntityInterface;
-use Drupal\Core\Entity\Field\FieldInterface;
+use Drupal\Core\Entity\Field\FieldItemListInterface;
use Drupal\taxonomy\Plugin\field\formatter\TaxonomyFormatterBase;
/**
@@ -29,7 +29,7 @@ class PlainFormatter extends TaxonomyFormatterBase {
/**
* {@inheritdoc}
*/
- public function viewElements(EntityInterface $entity, $langcode, FieldInterface $items) {
+ public function viewElements(EntityInterface $entity, $langcode, 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 69b0f2b..12f76b3 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
@@ -10,7 +10,7 @@
use Drupal\field\Annotation\FieldFormatter;
use Drupal\Core\Annotation\Translation;
use Drupal\Core\Entity\EntityInterface;
-use Drupal\Core\Entity\Field\FieldInterface;
+use Drupal\Core\Entity\Field\FieldItemListInterface;
use Drupal\taxonomy\Plugin\field\formatter\TaxonomyFormatterBase;
/**
@@ -29,7 +29,7 @@ class RSSCategoryFormatter extends TaxonomyFormatterBase {
/**
* {@inheritdoc}
*/
- public function viewElements(EntityInterface $entity, $langcode, FieldInterface $items) {
+ public function viewElements(EntityInterface $entity, $langcode, FieldItemListInterface $items) {
// Terms whose target_id is 'autocreate' do not exist yet and
// $item->entity is not set. Theme such terms as just their name.
foreach ($items as $item) {
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 a0ed35f..fb06cc5 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
@@ -10,7 +10,7 @@
use Drupal\field\Annotation\FieldFormatter;
use Drupal\Core\Annotation\Translation;
use Drupal\Core\Entity\EntityInterface;
-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 e651e8b..10495b0 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, $langcode, array &$form, array &$form_state) {
+ public function formElement(FieldItemListInterface $items, $delta, array $element, $langcode, 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 d922984..8a7b35d 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
@@ -11,7 +11,7 @@
use Drupal\Core\Annotation\Translation;
use Drupal\field\Plugin\Type\Formatter\FormatterBase;
use Drupal\Core\Entity\EntityInterface;
-use Drupal\Core\Entity\Field\FieldInterface;
+use Drupal\Core\Entity\Field\FieldItemListInterface;
/**
* Plugin implementation of the 'telephone_link' formatter.
@@ -82,7 +82,7 @@ public function prepareView(array $entities, $langcode, array $items) {
/**
* {@inheritdoc}
*/
- public function viewElements(EntityInterface $entity, $langcode, FieldInterface $items) {
+ public function viewElements(EntityInterface $entity, $langcode, FieldItemListInterface $items) {
$element = array();
foreach ($items as $delta => $item) {
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 e59adfc..a8c1330 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, $langcode, array &$form, array &$form_state) {
+ public function formElement(FieldItemListInterface $items, $delta, array $element, $langcode, 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 dd0ee71..ff80a0e 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
@@ -11,7 +11,7 @@
use Drupal\Core\Annotation\Translation;
use Drupal\field\Plugin\Type\Formatter\FormatterBase;
use Drupal\Core\Entity\EntityInterface;
-use Drupal\Core\Entity\Field\FieldInterface;
+use Drupal\Core\Entity\Field\FieldItemListInterface;
/**
* Plugin implementation of the 'text_default' formatter.
@@ -34,7 +34,7 @@ class TextDefaultFormatter extends FormatterBase {
/**
* {@inheritdoc}
*/
- public function viewElements(EntityInterface $entity, $langcode, FieldInterface $items) {
+ public function viewElements(EntityInterface $entity, $langcode, 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 2a95803..2999544 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
@@ -11,7 +11,7 @@
use Drupal\Core\Annotation\Translation;
use Drupal\field\Plugin\Type\Formatter\FormatterBase;
use Drupal\Core\Entity\EntityInterface;
-use Drupal\Core\Entity\Field\FieldInterface;
+use Drupal\Core\Entity\Field\FieldItemListInterface;
/**
* Plugin implementation of the 'text_plain' formatter.
@@ -34,7 +34,7 @@ class TextPlainFormatter extends FormatterBase {
/**
* Implements Drupal\field\Plugin\Type\Formatter\FormatterInterface::viewElements().
*/
- public function viewElements(EntityInterface $entity, $langcode, FieldInterface $items) {
+ public function viewElements(EntityInterface $entity, $langcode, 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 f2ca9e4..1a1109f 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
@@ -11,7 +11,7 @@
use Drupal\Core\Annotation\Translation;
use Drupal\field\Plugin\Type\Formatter\FormatterBase;
use Drupal\Core\Entity\EntityInterface;
-use Drupal\Core\Entity\Field\FieldInterface;
+use Drupal\Core\Entity\Field\FieldItemListInterface;
/**
* Plugin implementation of the 'text_trimmed'' formatter.
@@ -65,7 +65,7 @@ public function settingsSummary() {
/**
* {@inheritdoc}
*/
- public function viewElements(EntityInterface $entity, $langcode, FieldInterface $items) {
+ public function viewElements(EntityInterface $entity, $langcode, 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 bcddb6d..6dde5de 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, $langcode, array &$form, array &$form_state) {
+ public function formElement(FieldItemListInterface $items, $delta, array $element, $langcode, 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 a6edca8..d4f9bd8 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, $langcode, array &$form, array &$form_state) {
+ function formElement(FieldItemListInterface $items, $delta, array $element, $langcode, array &$form, array &$form_state) {
$element = parent::formElement($items, $delta, $element, $langcode, $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 3a24d37..c7ba59c 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, $langcode, array &$form, array &$form_state) {
+ public function formElement(FieldItemListInterface $items, $delta, array $element, $langcode, array &$form, array &$form_state) {
$main_widget = $element + array(
'#type' => 'textfield',
'#default_value' => isset($items[$delta]->value) ? $items[$delta]->value : NULL,