Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
project
drupal
Commits
0f8b4e79
Commit
0f8b4e79
authored
Oct 14, 2013
by
alexpott
Browse files
Issue
#2023563
by Berdir, smiletrl, fago: Convert entity field types to the field_type plugin.
parent
5b026c38
Changes
38
Hide whitespace changes
Inline
Side-by-side
core/lib/Drupal/Core/Entity/Annotation/FieldType.php
View file @
0f8b4e79
...
...
@@ -7,7 +7,7 @@
namespace
Drupal\Core\Entity\Annotation
;
use
Drupal\Co
mponent
\Annotation\
Plugin
;
use
Drupal\Co
re\TypedData
\Annotation\
DataType
;
/**
* Defines a FieldType annotation object.
...
...
@@ -17,7 +17,7 @@
*
* @Annotation
*/
class
FieldType
extends
Plugin
{
class
FieldType
extends
DataType
{
/**
* The plugin ID.
...
...
@@ -103,8 +103,6 @@ class FieldType extends Plugin {
/**
* A boolean stating that fields of this type are configurable.
*
* @todo: Make field module respect this.
*
* @var boolean
*/
public
$configurable
=
TRUE
;
...
...
@@ -112,10 +110,13 @@ class FieldType extends Plugin {
/**
* A boolean stating that fields of this type cannot be created through the UI.
*
* If TRUE, fields of this type can only be created programmatically.
*
* @var boolean
*/
public
$no_ui
=
FALSE
;
/**
* {@inheritdoc}
*/
public
$list_class
;
}
core/lib/Drupal/Core/Entity/Entity.php
View file @
0f8b4e79
...
...
@@ -7,7 +7,6 @@
namespace
Drupal\Core\Entity
;
use
Drupal\Core\Entity\Plugin\DataType\EntityReferenceItem
;
use
Drupal\Core\Language\Language
;
use
Drupal\Core\Session\AccountInterface
;
...
...
core/lib/Drupal/Core/Entity/EntityManager.php
View file @
0f8b4e79
...
...
@@ -471,8 +471,16 @@ public function getFieldDefinitions($entity_type, $bundle = NULL) {
}
else
{
$class
=
$this
->
factory
->
getPluginClass
(
$entity_type
,
$this
->
getDefinition
(
$entity_type
));
$base_definitions
=
$class
::
baseFieldDefinitions
(
$entity_type
);
foreach
(
$base_definitions
as
&
$base_definition
)
{
// Support old-style field types to avoid that all base field
// definitions need to be changed.
// @todo: Remove after https://drupal.org/node/2047229.
$base_definition
[
'type'
]
=
preg_replace
(
'/(.+)_field/'
,
'field_item:$1'
,
$base_definition
[
'type'
]);
}
$this
->
entityFieldInfo
[
$entity_type
]
=
array
(
'definitions'
=>
$
class
::
baseFieldDefinitions
(
$entity_type
)
,
'definitions'
=>
$
base_definitions
,
// Contains definitions of optional (per-bundle) fields.
'optional'
=>
array
(),
// An array keyed by bundle name containing the optional fields added
...
...
core/lib/Drupal/Core/Entity/Field/FieldTypePluginManager.php
View file @
0f8b4e79
...
...
@@ -25,7 +25,6 @@ class FieldTypePluginManager extends DefaultPluginManager {
protected
$defaults
=
array
(
'settings'
=>
array
(),
'instance_settings'
=>
array
(),
'list_class'
=>
'\Drupal\field\Plugin\Type\FieldType\ConfigFieldItemList'
,
);
/**
...
...
@@ -51,6 +50,21 @@ public function __construct(\Traversable $namespaces, CacheBackendInterface $cac
$this
->
discovery
=
new
LegacyFieldTypeDiscoveryDecorator
(
$this
->
discovery
,
$module_handler
);
}
/**
* {@inheritdoc}
*/
public
function
processDefinition
(
&
$definition
,
$plugin_id
)
{
parent
::
processDefinition
(
$definition
,
$plugin_id
);
if
(
!
isset
(
$definition
[
'list_class'
]))
{
if
(
$definition
[
'configurable'
])
{
$definition
[
'list_class'
]
=
'\Drupal\field\Plugin\Type\FieldType\ConfigFieldItemList'
;
}
else
{
$definition
[
'list_class'
]
=
'\Drupal\Core\Entity\Field\FieldItemList'
;
}
}
}
/**
* Returns the default field-level settings for a field type.
*
...
...
@@ -81,4 +95,17 @@ public function getDefaultInstanceSettings($type) {
return
isset
(
$info
[
'instance_settings'
])
?
$info
[
'instance_settings'
]
:
array
();
}
/**
* Gets the definition of all field types that are configurable.
*
* @return array
* An array of field type definitions.
*/
public
function
getConfigurableDefinitions
()
{
$definitions
=
$this
->
getDefinitions
();
return
array_filter
(
$definitions
,
function
(
$definition
)
{
return
$definition
[
'configurable'
];
});
}
}
core/lib/Drupal/Core/Entity/Plugin/
DataT
ype/BooleanItem.php
→
core/lib/Drupal/Core/Entity/Plugin/
field/field_t
ype/BooleanItem.php
View file @
0f8b4e79
...
...
@@ -2,23 +2,21 @@
/**
* @file
* Contains \Drupal\Core\Entity\Plugin\
DataT
ype\BooleanItem.
* Contains \Drupal\Core\Entity\Plugin\
field\field_t
ype\BooleanItem.
*/
namespace
Drupal\Core\Entity\Plugin\
DataT
ype
;
namespace
Drupal\Core\Entity\Plugin\
field\field_t
ype
;
use
Drupal\Core\TypedData\Annotation\DataType
;
use
Drupal\Core\Annotation\Translation
;
use
Drupal\Core\Entity\Field\FieldItemBase
;
/**
* Defines the 'boolean
_field
' entity field
item
.
* Defines the 'boolean' entity field
type
.
*
* @
Data
Type(
* id = "boolean
_field
",
* label = @Translation("Boolean
field item
"),
* @
Field
Type(
* id = "boolean",
* label = @Translation("Boolean"),
* description = @Translation("An entity field containing a boolean value."),
*
list_class = "\Drupal\Core\Entity\Field\FieldItemList"
*
configurable = FALSE
* )
*/
class
BooleanItem
extends
FieldItemBase
{
...
...
core/lib/Drupal/Core/Entity/Plugin/
DataT
ype/DateItem.php
→
core/lib/Drupal/Core/Entity/Plugin/
field/field_t
ype/DateItem.php
View file @
0f8b4e79
...
...
@@ -2,23 +2,21 @@
/**
* @file
* Contains \Drupal\Core\Entity\Plugin\
DataT
ype\DateItem.
* Contains \Drupal\Core\Entity\Plugin\
field\field_t
ype\DateItem.
*/
namespace
Drupal\Core\Entity\Plugin\
DataT
ype
;
namespace
Drupal\Core\Entity\Plugin\
field\field_t
ype
;
use
Drupal\Core\TypedData\Annotation\DataType
;
use
Drupal\Core\Annotation\Translation
;
use
Drupal\Core\Entity\Field\FieldItemBase
;
/**
* Defines the 'date
_field
' entity field
item
.
* Defines the 'date' entity field
type
.
*
* @
Data
Type(
* id = "date
_field
",
* label = @Translation("Date
field item
"),
* @
Field
Type(
* id = "date",
* label = @Translation("Date"),
* description = @Translation("An entity field containing a date value."),
*
list_class = "\Drupal\Core\Entity\Field\FieldItemList"
*
configurable = FALSE
* )
*/
class
DateItem
extends
FieldItemBase
{
...
...
core/lib/Drupal/Core/Entity/Plugin/
DataT
ype/EmailItem.php
→
core/lib/Drupal/Core/Entity/Plugin/
field/field_t
ype/EmailItem.php
View file @
0f8b4e79
...
...
@@ -2,27 +2,24 @@
/**
* @file
* Contains \Drupal\Core\Entity\Plugin\
DataT
ype\EmailItem.
* Contains \Drupal\Core\Entity\Plugin\
field\field_t
ype\EmailItem.
*/
namespace
Drupal\Core\Entity\Plugin\
DataT
ype
;
namespace
Drupal\Core\Entity\Plugin\
field\field_t
ype
;
use
Drupal\Core\TypedData\Annotation\DataType
;
use
Drupal\Core\Annotation\Translation
;
use
Drupal\Core\Entity\Field\FieldItemBase
;
use
Drupal\field\Plugin\field\field_type
\
LegacyConfigFieldItem
;
/**
* Defines the 'email
_field
' entity field
item
.
* Defines the 'email' entity field
type
.
*
* @
Data
Type(
* id = "email
_field
",
* label = @Translation("E-mail
field item
"),
* @
Field
Type(
* id = "email",
* label = @Translation("E-mail"),
* description = @Translation("An entity field containing an e-mail value."),
*
list_class = "\Drupal\Core\Entity\Field\FieldItemList"
*
configurable = FALSE
* )
*/
class
EmailItem
extends
LegacyConfig
FieldItem
{
class
EmailItem
extends
FieldItem
Base
{
/**
* Definitions of the contained properties.
...
...
@@ -54,4 +51,5 @@ public function getPropertyDefinitions() {
public
function
isEmpty
()
{
return
$this
->
value
===
NULL
||
$this
->
value
===
''
;
}
}
core/lib/Drupal/Core/Entity/Plugin/
DataT
ype/EntityReferenceItem.php
→
core/lib/Drupal/Core/Entity/Plugin/
field/field_t
ype/EntityReferenceItem.php
View file @
0f8b4e79
...
...
@@ -2,10 +2,10 @@
/**
* @file
* Contains \Drupal\Core\Entity\Plugin\
DataT
ype\EntityReferenceItem.
* Contains \Drupal\Core\Entity\Plugin\
field\field_t
ype\EntityReferenceItem.
*/
namespace
Drupal\Core\Entity\Plugin\
DataT
ype
;
namespace
Drupal\Core\Entity\Plugin\
field\field_t
ype
;
use
Drupal\Core\TypedData\Annotation\DataType
;
use
Drupal\Core\Annotation\Translation
;
...
...
@@ -13,7 +13,7 @@
use
Drupal\Core\TypedData\TypedDataInterface
;
/**
* Defines the 'entity_reference
_item
' entity field
item
.
* Defines the 'entity_reference' entity field
type
.
*
* Supported settings (below the definition's 'settings' key) are:
* - target_type: The entity type to reference. Required.
...
...
@@ -21,11 +21,11 @@
* may be referenced. May be set to an single bundle, or to an array of
* allowed bundles.
*
* @
Data
Type(
* id = "entity_reference
_field
",
* label = @Translation("Entity reference
field item
"),
* @
Field
Type(
* id = "entity_reference",
* label = @Translation("Entity reference"),
* description = @Translation("An entity field containing an entity reference."),
*
list_class = "\Drupal\Core\Entity\Field\FieldItemList"
,
*
configurable = FALSE
,
* constraints = {"ValidReference" = TRUE}
* )
*/
...
...
core/lib/Drupal/Core/Entity/Plugin/
DataT
ype/FloatItem.php
→
core/lib/Drupal/Core/Entity/Plugin/
field/field_t
ype/FloatItem.php
View file @
0f8b4e79
...
...
@@ -2,23 +2,21 @@
/**
* @file
* Contains \Drupal\Core\Entity\Plugin\
DataT
ype\FloatItem.
* Contains \Drupal\Core\Entity\Plugin\
field\field_t
ype\FloatItem.
*/
namespace
Drupal\Core\Entity\Plugin\
DataT
ype
;
namespace
Drupal\Core\Entity\Plugin\
field\field_t
ype
;
use
Drupal\Core\TypedData\Annotation\DataType
;
use
Drupal\Core\Annotation\Translation
;
use
Drupal\Core\Entity\Field\FieldItemBase
;
/**
* Defines the 'float
_field
' entity field
item
.
* Defines the 'float' entity field
type
.
*
* @
Data
Type(
* id = "float
_field
",
* label = @Translation("Float
field item
"),
* @
Field
Type(
* id = "float",
* label = @Translation("Float"),
* description = @Translation("An entity field containing an float value."),
*
list_class = "\Drupal\Core\Entity\Field\Field"
*
configurable = FALSE
* )
*/
class
FloatItem
extends
FieldItemBase
{
...
...
core/lib/Drupal/Core/Entity/Plugin/
DataT
ype/IntegerItem.php
→
core/lib/Drupal/Core/Entity/Plugin/
field/field_t
ype/IntegerItem.php
View file @
0f8b4e79
...
...
@@ -2,23 +2,21 @@
/**
* @file
* Contains \Drupal\Core\Entity\Plugin\
DataT
ype\IntegerItem.
* Contains \Drupal\Core\Entity\Plugin\
field\field_t
ype\IntegerItem.
*/
namespace
Drupal\Core\Entity\Plugin\
DataT
ype
;
namespace
Drupal\Core\Entity\Plugin\
field\field_t
ype
;
use
Drupal\Core\TypedData\Annotation\DataType
;
use
Drupal\Core\Annotation\Translation
;
use
Drupal\Core\Entity\Field\FieldItemBase
;
/**
* Defines the 'integer
_field
' entity field
item
.
* Defines the 'integer' entity field
type
.
*
* @
Data
Type(
* id = "integer
_field
",
* label = @Translation("Integer
field item
"),
* @
Field
Type(
* id = "integer",
* label = @Translation("Integer"),
* description = @Translation("An entity field containing an integer value."),
*
list_class = "\Drupal\Core\Entity\Field\FieldItemList"
*
configurable = FALSE
* )
*/
class
IntegerItem
extends
FieldItemBase
{
...
...
core/lib/Drupal/Core/Entity/Plugin/
DataT
ype/LanguageItem.php
→
core/lib/Drupal/Core/Entity/Plugin/
field/field_t
ype/LanguageItem.php
View file @
0f8b4e79
...
...
@@ -2,24 +2,22 @@
/**
* @file
* Contains \Drupal\Core\Entity\Plugin\
DataT
ype\LanguageItem.
* Contains \Drupal\Core\Entity\Plugin\
field\field_t
ype\LanguageItem.
*/
namespace
Drupal\Core\Entity\Plugin\
DataT
ype
;
namespace
Drupal\Core\Entity\Plugin\
field\field_t
ype
;
use
Drupal\Core\TypedData\Annotation\DataType
;
use
Drupal\Core\Annotation\Translation
;
use
Drupal\Core\Entity\Field\FieldItemBase
;
use
Drupal\Core\Language\Language
;
/**
* Defines the 'language
_field
' entity field item.
* Defines the 'language' entity field item.
*
* @
Data
Type(
* id = "language
_field
",
* label = @Translation("Language
field item
"),
* @
Field
Type(
* id = "language",
* label = @Translation("Language"),
* description = @Translation("An entity field referencing a language."),
*
list_class = "\Drupal\Core\Entity\Field\FieldItemList"
,
*
configurable = FALSE
,
* constraints = {
* "ComplexData" = {
* "value" = {"Length" = {"max" = 12}}
...
...
core/lib/Drupal/Core/Entity/Plugin/
DataT
ype/StringItem.php
→
core/lib/Drupal/Core/Entity/Plugin/
field/field_t
ype/StringItem.php
View file @
0f8b4e79
...
...
@@ -2,23 +2,21 @@
/**
* @file
* Contains \Drupal\Core\Entity\Plugin\
DataT
ype\StringItem.
* Contains \Drupal\Core\Entity\Plugin\
field\field_t
ype\StringItem.
*/
namespace
Drupal\Core\Entity\Plugin\
DataT
ype
;
namespace
Drupal\Core\Entity\Plugin\
field\field_t
ype
;
use
Drupal\Core\TypedData\Annotation\DataType
;
use
Drupal\Core\Annotation\Translation
;
use
Drupal\Core\Entity\Field\FieldItemBase
;
/**
* Defines the 'string
_field
' entity field
item
.
* Defines the 'string' entity field
type
.
*
* @
Data
Type(
* id = "string
_field
",
* label = @Translation("String
field item
"),
* @
Field
Type(
* id = "string",
* label = @Translation("String"),
* description = @Translation("An entity field containing a string value."),
*
list_class = "\Drupal\Core\Entity\Field\FieldItemList"
*
configurable = FALSE
* )
*/
class
StringItem
extends
FieldItemBase
{
...
...
core/lib/Drupal/Core/Entity/Plugin/
DataT
ype/UriItem.php
→
core/lib/Drupal/Core/Entity/Plugin/
field/field_t
ype/UriItem.php
View file @
0f8b4e79
...
...
@@ -2,23 +2,21 @@
/**
* @file
* Contains \Drupal\Core\Entity\Plugin\
DataT
ype\UriItem.
* Contains \Drupal\Core\Entity\Plugin\
field\field_t
ype\UriItem.
*/
namespace
Drupal\Core\Entity\Plugin\
DataT
ype
;
namespace
Drupal\Core\Entity\Plugin\
field\field_t
ype
;
use
Drupal\Core\TypedData\Annotation\DataType
;
use
Drupal\Core\Annotation\Translation
;
use
Drupal\Core\Entity\Field\FieldItemBase
;
/**
* Defines the 'uri
_field
' entity field
item
.
* Defines the 'uri' entity field
type
.
*
* @
Data
Type(
* id = "uri
_field
",
* label = @Translation("URI
field item
"),
* @
Field
Type(
* id = "uri",
* label = @Translation("URI"),
* description = @Translation("An entity field containing a URI."),
*
list_class = "\Drupal\Core\Entity\Field\FieldItemList"
*
configurable = FALSE
* )
*/
class
UriItem
extends
FieldItemBase
{
...
...
core/lib/Drupal/Core/Entity/Plugin/
DataT
ype/UuidItem.php
→
core/lib/Drupal/Core/Entity/Plugin/
field/field_t
ype/UuidItem.php
View file @
0f8b4e79
...
...
@@ -2,24 +2,21 @@
/**
* @file
* Contains \Drupal\Core\Entity\Plugin\
DataT
ype\UuidItem.
* Contains \Drupal\Core\Entity\Plugin\
field\field_t
ype\UuidItem.
*/
namespace
Drupal\Core\Entity\Plugin\DataType
;
use
Drupal\Core\TypedData\Annotation\DataType
;
use
Drupal\Core\Annotation\Translation
;
namespace
Drupal\Core\Entity\Plugin\field\field_type
;
/**
* Defines the 'uuid
_field
' entity field
item
.
* Defines the 'uuid' entity field
type
.
*
* The field uses a newly generated UUID as default value.
*
* @
Data
Type(
* id = "uuid
_field
",
* label = @Translation("UUID
field item
"),
* @
Field
Type(
* id = "uuid",
* label = @Translation("UUID"),
* description = @Translation("An entity field containing a UUID."),
*
list_class = "\Drupal\Core\Entity\Field\FieldItemList"
,
*
configurable = FALSE
,
* constraints = {
* "ComplexData" = {
* "value" = {"Length" = {"max" = 128}}
...
...
core/modules/comment/lib/Drupal/comment/CommentFieldName.php
View file @
0f8b4e79
...
...
@@ -7,7 +7,7 @@
namespace
Drupal\comment
;
use
Drupal\Core\Entity\Plugin\
DataT
ype\StringItem
;
use
Drupal\Core\Entity\Plugin\
field\field_t
ype
\
StringItem
;
/**
* The field item for the 'fieldname' field.
...
...
core/modules/comment/lib/Drupal/comment/Plugin/field/field_type/CommentItem.php
View file @
0f8b4e79
...
...
@@ -49,11 +49,8 @@ public function getPropertyDefinitions() {
'label'
=>
t
(
'Comment status value'
),
),
'cid'
=>
array
(
'type'
=>
'
e
nt
ity_reference_field
'
,
'type'
=>
'
i
nt
eger
'
,
'label'
=>
t
(
'Last comment ID'
),
'settings'
=>
array
(
'target_type'
=>
'comment'
,
),
),
'last_comment_timestamp'
=>
array
(
'label'
=>
t
(
'Last comment timestamp'
),
...
...
@@ -66,11 +63,8 @@ public function getPropertyDefinitions() {
'type'
=>
'string'
,
),
'last_comment_uid'
=>
array
(
'type'
=>
'
e
nt
ity_reference_field
'
,
'type'
=>
'
i
nt
eger
'
,
'label'
=>
t
(
'Last comment user ID'
),
'settings'
=>
array
(
'target_type'
=>
'user'
,
),
),
'comment_count'
=>
array
(
'label'
=>
t
(
'Number of comments'
),
...
...
core/modules/email/email.module
View file @
0f8b4e79
...
...
@@ -31,9 +31,16 @@ function email_help($path, $arg) {
* Implements hook_field_info_alter().
*/
function
email_field_info_alter
(
&
$info
)
{
$info
[
'email'
][
'configurable'
]
=
TRUE
;
$info
[
'email'
][
'class'
]
=
'\Drupal\email\ConfigurableEmailItem'
;
$info
[
'email'
][
'list_class'
]
=
'\Drupal\field\Plugin\Type\FieldType\ConfigFieldItemList'
;
$info
[
'email'
][
'default_widget'
]
=
'email_default'
;
if
(
\
Drupal
::
moduleHandler
()
->
moduleExists
(
'text'
))
{
$info
[
'email'
][
'default_formatter'
]
=
'text_plain'
;
}
else
{
$info
[
'email'
][
'default_formatter'
]
=
'email_mailto'
;
}
}
/**
...
...
core/modules/email/lib/Drupal/email/
Plugin/field/field_type/
ConfigurableEmailItem.php
→
core/modules/email/lib/Drupal/email/ConfigurableEmailItem.php
View file @
0f8b4e79
...
...
@@ -2,26 +2,21 @@
/**
* @file
* Contains \Drupal\email\
Plugin\field\field_type\
ConfigurableEmailItem.
* Contains \Drupal\email\ConfigurableEmailItem.
*/
namespace
Drupal\email
\Plugin\field\field_type
;
namespace
Drupal\email
;
use
Drupal\Core\Entity\Plugin\
DataT
ype\EmailItem
;
use
Drupal\Core\Entity\Plugin\
field\field_t
ype
\
EmailItem
;
use
Drupal\field\FieldInterface
;
use
Drupal\field\Plugin\Type\FieldType\ConfigFieldItemInterface
;
/**
*
P
lugin implementation
o
f the 'email' field type.
*
Alternative p
lugin implementation f
or
the 'email'
entity
field type.
*
* @FieldType(
* id = "email",
* label = @Translation("E-mail"),
* description = @Translation("This field stores an e-mail address in the database."),
* default_widget = "email_default",
* default_formatter = "email_mailto"
* )
* Replaces the default implementation and supports configurable fields.
*/
class
ConfigurableEmailItem
extends
EmailItem
{
class
ConfigurableEmailItem
extends
EmailItem
implements
ConfigFieldItemInterface
{
/**
* Defines the max length for an email address
...
...
@@ -69,4 +64,19 @@ public function getConstraints() {
return
$constraints
;
}
/**
* {@inheritdoc}
*/
public
function
settingsForm
(
array
$form
,
array
&
$form_state
,
$has_data
)
{
return
array
();
}
/**
* {@inheritdoc}
*/
public
function
instanceSettingsForm
(
array
$form
,
array
&
$form_state
)
{
return
array
();
}
}
core/modules/entity_reference/entity_reference.module
View file @
0f8b4e79
...
...
@@ -15,11 +15,15 @@
* Implements hook_field_info_alter().
*/
function
entity_reference_field_info_alter
(
&
$info
)
{
if
(
!
\
Drupal
::
moduleHandler
()
->
moduleExists
(
'node'
))
{
// Fall back to another primary entity type if the Node module is not
// available.
$info
[
'entity_reference'
][
'settings'
][
'target_type'
]
=
'user'
;
}
// Make the entity reference field configurable.
$info
[
'entity_reference'
][
'configurable'
]
=
TRUE
;
$info
[
'entity_reference'
][
'class'
]
=
'\Drupal\entity_reference\ConfigurableEntityReferenceItem'
;
$info
[
'entity_reference'
][
'list_class'
]
=
'\Drupal\field\Plugin\Type\FieldType\ConfigFieldItemList'
;
$info
[
'entity_reference'
][
'settings'
][
'target_type'
]
=
\
Drupal
::
moduleHandler
()
->
moduleExists
(
'node'
)
?
'node'
:
'user'
;
$info
[
'entity_reference'
][
'instance_settings'
][
'handler'
]
=
'default'
;
$info
[
'entity_reference'
][
'instance_settings'
][
'handler_settings'
]
=
array
();
$info
[
'entity_reference'
][
'default_widget'
]
=
'entity_reference_autocomplete'
;
$info
[
'entity_reference'
][
'default_formatter'
]
=
'entity_reference_label'
;
}
/**
...
...
@@ -27,7 +31,7 @@ function entity_reference_field_info_alter(&$info) {
*
* Set the "target_type" property definition for entity reference fields.
*
* @see \Drupal\Core\Entity\Plugin\
DataT
ype\EntityReferenceItem::getPropertyDefinitions()
* @see \Drupal\Core\Entity\Plugin\
field\field_t
ype\EntityReferenceItem::getPropertyDefinitions()
*
* @param array $info
* The property info array as returned by hook_entity_field_info().
...
...
core/modules/entity_reference/lib/Drupal/entity_reference/
Plugin/field/field_type/
ConfigurableEntityReferenceItem.php
→
core/modules/entity_reference/lib/Drupal/entity_reference/ConfigurableEntityReferenceItem.php
View file @
0f8b4e79
...
...
@@ -2,39 +2,23 @@
/**
* @file
* Contains \Drupal\entity_reference\
Plugin\field\field_type\
ConfigurableEntityReferenceItem.
* Contains \Drupal\entity_reference\ConfigurableEntityReferenceItem.
*/
namespace
Drupal\entity_reference
\Plugin\field\field_type
;
namespace
Drupal\entity_reference
;