comparison core/modules/config_translation/src/ConfigFieldMapper.php @ 5:12f9dff5fda9 tip

Update to Drupal core 8.7.1
author Chris Cannam
date Thu, 09 May 2019 15:34:47 +0100
parents c75dbcec494b
children
comparison
equal deleted inserted replaced
4:a9cd425dd02b 5:12f9dff5fda9
24 /** 24 /**
25 * {@inheritdoc} 25 * {@inheritdoc}
26 */ 26 */
27 public function getBaseRouteParameters() { 27 public function getBaseRouteParameters() {
28 $parameters = parent::getBaseRouteParameters(); 28 $parameters = parent::getBaseRouteParameters();
29 $base_entity_info = $this->entityManager->getDefinition($this->pluginDefinition['base_entity_type']); 29 $base_entity_info = $this->entityTypeManager->getDefinition($this->pluginDefinition['base_entity_type']);
30 $bundle_parameter_key = $base_entity_info->getBundleEntityType() ?: 'bundle'; 30 $bundle_parameter_key = $base_entity_info->getBundleEntityType() ?: 'bundle';
31 $parameters[$bundle_parameter_key] = $this->entity->getTargetBundle(); 31 $parameters[$bundle_parameter_key] = $this->entity->getTargetBundle();
32 return $parameters; 32 return $parameters;
33 } 33 }
34 34
41 41
42 /** 42 /**
43 * {@inheritdoc} 43 * {@inheritdoc}
44 */ 44 */
45 public function getTypeLabel() { 45 public function getTypeLabel() {
46 $base_entity_info = $this->entityManager->getDefinition($this->pluginDefinition['base_entity_type']); 46 $base_entity_info = $this->entityTypeManager->getDefinition($this->pluginDefinition['base_entity_type']);
47 return $this->t('@label fields', ['@label' => $base_entity_info->getLabel()]); 47 return $this->t('@label fields', ['@label' => $base_entity_info->getLabel()]);
48 } 48 }
49 49
50 /** 50 /**
51 * {@inheritdoc} 51 * {@inheritdoc}
56 // Field storage config can also contain translatable values. Add the name 56 // Field storage config can also contain translatable values. Add the name
57 // of the config as well to the list of configs for this entity. 57 // of the config as well to the list of configs for this entity.
58 /** @var \Drupal\field\FieldStorageConfigInterface $field_storage */ 58 /** @var \Drupal\field\FieldStorageConfigInterface $field_storage */
59 $field_storage = $this->entity->getFieldStorageDefinition(); 59 $field_storage = $this->entity->getFieldStorageDefinition();
60 /** @var \Drupal\Core\Config\Entity\ConfigEntityTypeInterface $entity_type_info */ 60 /** @var \Drupal\Core\Config\Entity\ConfigEntityTypeInterface $entity_type_info */
61 $entity_type_info = $this->entityManager->getDefinition($field_storage->getEntityTypeId()); 61 $entity_type_info = $this->entityTypeManager->getDefinition($field_storage->getEntityTypeId());
62 $this->addConfigName($entity_type_info->getConfigPrefix() . '.' . $field_storage->id()); 62 $this->addConfigName($entity_type_info->getConfigPrefix() . '.' . $field_storage->id());
63 return TRUE; 63 return TRUE;
64 } 64 }
65 return FALSE; 65 return FALSE;
66 } 66 }