Skip to content
Snippets Groups Projects
Commit d7f5ad2d authored by Igor Biki's avatar Igor Biki
Browse files

ISTWCMS-7275: Update 'publication_reference' to 'reference' in UwCblTeaser

Replaced all occurrences of 'publication_reference' with 'reference' for consistency and accuracy in content type handling. Adjustments ensure alignment with bibcite reference configurations and streamline block logic.
parent 0722cd93
No related branches found
No related tags found
No related merge requests found
This commit is part of merge request !267. Comments created here will be created in the context of that merge request.
......@@ -305,7 +305,7 @@ class UwCblTeaser extends BlockBase implements ContainerFactoryPluginInterface {
];
}
// Override settings for bibcite references.
elseif ($contentType === 'publication_reference') {
elseif ($contentType === 'reference') {
$form[$contentType]['nid'] = [
'#type' => 'entity_autocomplete',
'#target_type' => 'bibcite_reference',
......@@ -378,7 +378,7 @@ class UwCblTeaser extends BlockBase implements ContainerFactoryPluginInterface {
}
// If bibcite reference is used, make sure to load bibcite entity.
if ($this->configuration['content_type'] === 'publication_reference') {
if ($this->configuration['content_type'] === 'reference') {
return $this->entityTypeManager->getStorage('bibcite_reference')->load($entity_id);
}
......@@ -408,7 +408,7 @@ class UwCblTeaser extends BlockBase implements ContainerFactoryPluginInterface {
// Set the config for teaser.
$this->configuration['content_type'] = $content_type;
if ($content_type == 'publication_reference') {
if ($content_type == 'reference') {
$this->configuration['nid'] = $values[$content_type]['nid'];
}
else {
......@@ -479,7 +479,7 @@ class UwCblTeaser extends BlockBase implements ContainerFactoryPluginInterface {
'opportunity' => $this->t('Opportunity'),
'profile' => $this->t('Profile'),
'project' => $this->t('Project'),
'publication_reference' => $this->t('Publication reference'),
'reference' => $this->t('Reference'),
'service' => $this->t('Service'),
];
}
......@@ -502,7 +502,7 @@ class UwCblTeaser extends BlockBase implements ContainerFactoryPluginInterface {
'opportunity' => 'uw_ct_opportunity',
'profile' => 'uw_ct_profile',
'project' => 'uw_ct_project',
'publication_reference' => 'bibcite_reference',
'reference' => 'bibcite_reference',
'service' => 'uw_ct_service',
];
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment