Skip to content
Snippets Groups Projects

Issue #3487518: Allow 'Schema.org Blueprint Entity Prepopulate Node Links' block to use node id

Merged Issue #3487518: Allow 'Schema.org Blueprint Entity Prepopulate Node Links' block to use node id
Files
3
@@ -32,16 +32,18 @@ function schemadotorg_allowed_formats_schemadotorg_property_field_alter(
$config = \Drupal::config('schemadotorg_allowed_formats.settings');
// Set default allowed formats.
$default_allowed_formats = $config->get('default_allowed_formats');
$parts = [
'entity_type_id' => $field_values['entity_type'],
'bundle' => $field_values['bundle'],
'schema_type' => $schema_type,
'schema_property' => $schema_property,
];
$allowed_formats = $schema_type_manager->getSetting($default_allowed_formats, $parts);
if ($allowed_formats) {
$field_values['settings']['allowed_formats'] = $allowed_formats;
if (empty($field_values['settings']['allowed_formats'])) {
$default_allowed_formats = $config->get('default_allowed_formats');
$parts = [
'entity_type_id' => $field_values['entity_type'],
'bundle' => $field_values['bundle'],
'schema_type' => $schema_type,
'schema_property' => $schema_property,
];
$allowed_formats = $schema_type_manager->getSetting($default_allowed_formats, $parts);
if ($allowed_formats) {
$field_values['settings']['allowed_formats'] = $allowed_formats;
}
}
// Set default hide help.
Loading