Skip to content

Commit

Permalink
Merge pull request #458 from esmero/ISSUE-457
Browse files Browse the repository at this point in the history
ISSUE-457: Multiple bug fixes and improvements for Content Search API (Plain Text)
  • Loading branch information
DiegoPino authored Aug 5, 2024
2 parents 63570d9 + cc9db93 commit edfa658
Show file tree
Hide file tree
Showing 6 changed files with 124 additions and 99 deletions.
208 changes: 117 additions & 91 deletions src/Controller/IiifContentSearchController.php

Large diffs are not rendered by default.

1 change: 0 additions & 1 deletion src/Controller/MetadataExposeDisplayController.php
Original file line number Diff line number Diff line change
Expand Up @@ -150,7 +150,6 @@ public function castViaTwig(
)) {
if ($metadatadisplay_entity = $metadataexposeconfig_entity->getMetadataDisplayEntity(
)) {

try {
$responsetypefield = $metadatadisplay_entity->get('mimetype');
$responsetype = $responsetypefield->first()->getValue();
Expand Down
2 changes: 1 addition & 1 deletion src/Entity/MetadataDisplayEntity.php
Original file line number Diff line number Diff line change
Expand Up @@ -746,7 +746,7 @@ private function generateCacheTagsFromRelated(Node $node) {
$display_object = $executable->getDisplay($display);
if ($display_object) {
// We won't fetch context here. The Twig template itself escapes the
// Original Caching context of a View because its rendered out of scope.
// Original Caching context of a View because it is rendered out of scope.
$tags = array_merge($display_object->getCacheMetadata()->getCacheTags(), $tags);
}
if (is_array($display)) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -150,8 +150,8 @@ public function settingsForm(array $form, FormStateInterface $form_state) {
'@optional' => $iiifrequired ? '(required)' : '(optional)',
]),
'#description' => t('When using IIIF manifests as source, alternate JSON Key(s) embargo settings and JSON Key(s) where media needs to exists are not going to be respected automatically. Those need to be logically programmed via Twig at the Metadata Display Entity (template) that generates the manifest. Means no embargo settings (upload keys) for this formatter will be carried/passed to the template.'),
'#options' => $all_options_form_source,
'#default_value' => $this->getSetting('mediasource'),
'#options' => $all_options_form_source ?? [],
'#default_value' => $this->getSetting('mediasource') ?? [],
'#required' => $iiifrequired,
'#attributes' => [
'data-formatter-selector' => 'mediasource',
Expand Down
4 changes: 2 additions & 2 deletions src/Plugin/Field/FieldFormatter/StrawberryMapFormatter.php
Original file line number Diff line number Diff line change
Expand Up @@ -303,7 +303,7 @@ public function settingsForm(array $form, FormStateInterface $form_state) {
'#type' => 'checkboxes',
'#title' => $this->t('Source(s) for your GeoJSON URLs.'),
'#options' => $all_options_form_source,
'#default_value' => $this->getSetting('mediasource'),
'#default_value' => $this->getSetting('mediasource') ?? [],
'#required' => TRUE,
'#attributes' => [
'data-formatter-selector' => 'mediasource',
Expand All @@ -314,7 +314,7 @@ public function settingsForm(array $form, FormStateInterface $form_state) {
'#type' => 'checkboxes',
'#title' => $this->t('Optional: Source(s) for IIIF Manifest that will provide Georeferenced W3C Annotations for Overlays.'),
'#options' => $all_options_form_overlaysource,
'#default_value' => $this->getSetting('overlaysource'),
'#default_value' => $this->getSetting('overlaysource') ?? [],
'#required' => FALSE,
'#attributes' => [
'data-formatter-selector' => 'overlaysource',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -204,8 +204,8 @@ public function settingsForm(array $form, FormStateInterface $form_state) {
'mediasource' => [
'#type' => 'checkboxes',
'#title' => $this->t('Source for your IIIF Manifest URLs.'),
'#options' => $all_options_form_source,
'#default_value' => $this->getSetting('mediasource'),
'#options' => $all_options_form_source ?? [],
'#default_value' => $this->getSetting('mediasource') ?? [],
'#required' => TRUE,
'#attributes' => [
'data-formatter-selector' => 'mediasource',
Expand Down

0 comments on commit edfa658

Please sign in to comment.