Browse Source

some of these urls are necessary as strings

d9_islandora
Eli Zoller 4 years ago
parent
commit
5b08b765cb
  1. 2
      modules/islandora_iiif/src/Plugin/views/style/IIIFManifest.php
  2. 2
      src/Form/IslandoraSettingsForm.php
  3. 2
      tests/src/Functional/JsonldSelfReferenceReactionTest.php

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

@ -186,7 +186,7 @@ class IIIFManifest extends StylePluginBase {
foreach ($images as $image) {
// Create the IIIF URL for this file
// Visiting $iiif_url will resolve to the info.json for the image.
$file_url = $image->entity->toUrl();
$file_url = $image->entity->toUrl()->toString();
$mime_type = $image->entity->getMimeType();
$iiif_url = rtrim($iiif_address, '/') . '/' . urlencode($file_url);

2
src/Form/IslandoraSettingsForm.php

@ -7,6 +7,7 @@ use Drupal\Core\Entity\EntityTypeBundleInfoInterface;
use Drupal\Core\Form\ConfigFormBase;
use Drupal\Core\Form\FormStateInterface;
use Drupal\Core\Site\Settings;
use Drupal\Core\Url;
use GuzzleHttp\Exception\ConnectException;
use Islandora\Crayfish\Commons\Client\GeminiClient;
use Stomp\Client;
@ -271,6 +272,7 @@ class IslandoraSettingsForm extends ConfigFormBase {
$geminiUrlValue = trim($form_state->getValue(self::GEMINI_URL));
if (!empty($geminiUrlValue)) {
try {
$geminiUrl = Url::fromUri($geminiUrlValue);
$client = GeminiClient::create($geminiUrlValue, $this->logger('islandora'));
$client->findByUri('http://example.org');
}

2
tests/src/Functional/JsonldSelfReferenceReactionTest.php

@ -153,7 +153,7 @@ class JsonldSelfReferenceReactionTest extends IslandoraFunctionalTestBase {
$reaction_id = 'islandora_map_uri_predicate';
list($file, $media) = $this->makeMediaAndFile($account);
$media_url = $media->toUrl('canonical', ['absolute' => TRUE]);
$media_url = $media->toUrl('canonical', ['absolute' => TRUE])->toString();
$file_url = $file->createFileUrl(FALSE);
$this->drupalGet($media_url);

Loading…
Cancel
Save