Browse Source

Add Structured OCR field to IIIF Manifest view.

pull/897/head
Alexander O'Neill 2 years ago
parent
commit
bd17a381ea
  1. 10
      modules/islandora_iiif/src/Plugin/views/style/IIIFManifest.php
  2. 1
      src/Plugin/Action/AbstractGenerateDerivativeMediaFile.php

10
modules/islandora_iiif/src/Plugin/views/style/IIIFManifest.php

@ -313,6 +313,7 @@ class IIIFManifest extends StylePluginBase {
$options = parent::defineOptions();
$options['iiif_tile_field'] = ['default' => ''];
$options['iiif_ocr_file_field'] = ['default' => ''];
return $options;
}
@ -368,6 +369,15 @@ class IIIFManifest extends StylePluginBase {
// otherwise could lock up the form when setting up a View.
'#required' => count($field_options) > 0,
];
$form['iiif_ocr_file_field'] = [
'#title' => $this->t('Structured OCR data file field'),
'#type' => 'checkboxes',
'#default_value' => $this->options['iiif_ocr_file_field'],
'#description' => $this->t('The source of structured OCR text for each entity.'),
'#options' => $field_options,
'#required' => FALSE,
];
}
/**

1
src/Plugin/Action/AbstractGenerateDerivativeMediaFile.php

@ -5,7 +5,6 @@ namespace Drupal\islandora\Plugin\Action;
use Drupal\Core\Entity\EntityInterface;
use Drupal\Core\Form\FormStateInterface;
use Drupal\Core\Url;
/**
* Emits a Node for generating derivatives event.
*

Loading…
Cancel
Save