diff --git a/core/modules/system/lib/Drupal/system/Tests/Entity/EntityTypedDataDefinitionTest.php b/core/modules/system/lib/Drupal/system/Tests/Entity/EntityTypedDataDefinitionTest.php index 23a62e1..ac0bd5c 100644 --- a/core/modules/system/lib/Drupal/system/Tests/Entity/EntityTypedDataDefinitionTest.php +++ b/core/modules/system/lib/Drupal/system/Tests/Entity/EntityTypedDataDefinitionTest.php @@ -2,7 +2,7 @@ /** * @file - * Definition of Drupal\system\Tests\TypedData\EntityTypedDataDefinitionTest. + * Contains \Drupal\system\Tests\Entity\EntityTypedDataDefinitionTest. */ namespace Drupal\system\Tests\Entity; @@ -101,7 +101,7 @@ public function testEntities() { // Comparison should ignore the internal static cache, so compare the // serialized objects instead. $this->assertEqual(serialize($field_definitions), serialize(\Drupal::entityManager()->getFieldDefinitions('node'))); - $this->assertEqual($entity_definition->getPropertyDefinition('title')->getItemDefinition()->getDataType(), 'field_item:text'); + $this->assertEqual($entity_definition->getPropertyDefinition('title')->getItemDefinition()->getDataType(), 'field_item:string'); $this->assertNull($entity_definition->getMainPropertyName()); $this->assertNull($entity_definition->getPropertyDefinition('invalid')); diff --git a/core/modules/telephone/lib/Drupal/telephone/Plugin/Field/FieldType/TelephoneItem.php b/core/modules/telephone/lib/Drupal/telephone/Plugin/Field/FieldType/TelephoneItem.php index e710ded..6a47145 100644 --- a/core/modules/telephone/lib/Drupal/telephone/Plugin/Field/FieldType/TelephoneItem.php +++ b/core/modules/telephone/lib/Drupal/telephone/Plugin/Field/FieldType/TelephoneItem.php @@ -19,7 +19,7 @@ * label = @Translation("Telephone number"), * description = @Translation("This field stores a telephone number in the database."), * default_widget = "telephone_default", - * default_formatter = "telephone_link" + * default_formatter = "string" * ) */ class TelephoneItem extends ConfigFieldItemBase { diff --git a/core/modules/text/lib/Drupal/text/Plugin/Field/FieldType/TextItem.php b/core/modules/text/lib/Drupal/text/Plugin/Field/FieldType/TextItem.php index 463f170..93bd949 100644 --- a/core/modules/text/lib/Drupal/text/Plugin/Field/FieldType/TextItem.php +++ b/core/modules/text/lib/Drupal/text/Plugin/Field/FieldType/TextItem.php @@ -55,16 +55,16 @@ public static function schema(FieldDefinitionInterface $field_definition) { * {@inheritdoc} */ public function getConstraints() { + $constraint_manager = \Drupal::typedDataManager()->getValidationConstraintManager(); $constraints = parent::getConstraints(); if ($max_length = $this->getSetting('max_length')) { - $constraint_manager = \Drupal::typedDataManager()->getValidationConstraintManager(); $constraints[] = $constraint_manager->create('ComplexData', array( 'value' => array( 'Length' => array( 'max' => $max_length, 'maxMessage' => t('%name: the text may not be longer than @max characters.', array('%name' => $this->getFieldDefinition()->getLabel(), '@max' => $max_length)), - ), + ) ), )); }