Issue #3206932 by Matroskeen, quietone, alexpott: Rename targetEntityType constant in d6_view_mode migration to simplify source plugin

merge-requests/627/head
Alex Pott 2021-05-04 10:53:23 +01:00
parent 8dccf4b37d
commit bd2a1eabe0
No known key found for this signature in database
GPG Key ID: 31905460D4A69276
2 changed files with 3 additions and 2 deletions

View File

@ -6,7 +6,7 @@ migration_tags:
source:
plugin: d6_view_mode
constants:
targetEntityType: node
entity_type: node
status: true
process:
mode:
@ -33,7 +33,7 @@ process:
5: "Print"
teaser: "Teaser"
full: "Full"
targetEntityType: 'constants/targetEntityType'
targetEntityType: 'constants/entity_type'
status: 'constants/status'
destination:
plugin: entity:entity_view_mode

View File

@ -71,6 +71,7 @@ class ViewMode extends ViewModeBase {
public function calculateDependencies() {
$this->dependencies = parent::calculateDependencies();
if (isset($this->configuration['constants']['targetEntityType'])) {
@trigger_error('The constant targetEntityType is deprecated in drupal:9.2.0 and is removed in drupal:10.0.0. Use entity_type instead. See https://www.drupal.org/node/3208135', E_USER_DEPRECATED);
$this->addDependency('module', $this->entityTypeManager->getDefinition($this->configuration['constants']['targetEntityType'])->getProvider());
}
return $this->dependencies;