X-Git-Url: http://aleph1.co.uk/gitweb/?a=blobdiff_plain;f=web%2Fcore%2Flib%2FDrupal%2FCore%2FEntity%2FEntityType.php;h=c6f320fd6e60c6e03839e9a770a68403890cbcf5;hb=5b8bb166bfa98770daef9de5c127fc2e6ef02340;hp=28f5b4ed753e6d2be39c9f6bcb24ce1f41dad9ee;hpb=af6d1fb995500ae68849458ee10d66abbdcfb252;p=yaffs-website diff --git a/web/core/lib/Drupal/Core/Entity/EntityType.php b/web/core/lib/Drupal/Core/Entity/EntityType.php index 28f5b4ed7..c6f320fd6 100644 --- a/web/core/lib/Drupal/Core/Entity/EntityType.php +++ b/web/core/lib/Drupal/Core/Entity/EntityType.php @@ -3,7 +3,7 @@ namespace Drupal\Core\Entity; use Drupal\Component\Plugin\Definition\PluginDefinition; -use Drupal\Component\Utility\Unicode; +use Drupal\Core\DependencyInjection\DependencySerializationTrait; use Drupal\Core\Entity\Exception\EntityTypeIdLengthException; use Drupal\Core\StringTranslation\StringTranslationTrait; use Drupal\Core\StringTranslation\TranslatableMarkup; @@ -15,6 +15,7 @@ use Drupal\Core\StringTranslation\TranslatableMarkup; */ class EntityType extends PluginDefinition implements EntityTypeInterface { + use DependencySerializationTrait; use StringTranslationTrait; /** @@ -295,7 +296,7 @@ class EntityType extends PluginDefinition implements EntityTypeInterface { */ public function __construct($definition) { // Throw an exception if the entity type ID is longer than 32 characters. - if (Unicode::strlen($definition['id']) > static::ID_MAX_LENGTH) { + if (mb_strlen($definition['id']) > static::ID_MAX_LENGTH) { throw new EntityTypeIdLengthException('Attempt to create an entity type with an ID longer than ' . static::ID_MAX_LENGTH . " characters: {$definition['id']}."); } @@ -768,7 +769,7 @@ class EntityType extends PluginDefinition implements EntityTypeInterface { * {@inheritdoc} */ public function getLowercaseLabel() { - return Unicode::strtolower($this->getLabel()); + return mb_strtolower($this->getLabel()); } /** @@ -837,7 +838,6 @@ class EntityType extends PluginDefinition implements EntityTypeInterface { return $this->group; } - /** * {@inheritdoc} */