Browse Source

modified the text in fdggraph field formatter

master
ppound 6 years ago
parent
commit
9c5e1e66d4
  1. 4
      src/Plugin/Field/FieldFormatter/FdgGraphTextFieldFormatter.php

4
src/Plugin/Field/FieldFormatter/FdgGraphTextFieldFormatter.php

@ -48,9 +48,9 @@ class FdgGraphTextFieldFormatter extends FormatterBase {
$fieldLabel = str_replace(' ', '_', $field->getLabel()); $fieldLabel = str_replace(' ', '_', $field->getLabel());
$municipality = ($fieldLabel == 'Municipality') ? $item->value : 'NULL'; $municipality = ($fieldLabel == 'Municipality') ? $item->value : 'NULL';
$scientificName = ($fieldLabel == 'Scientific_Name') ? $item->value : 'NULL'; $scientificName = ($fieldLabel == 'Scientific_Name') ? $item->value : 'NULL';
$link_fdg_source = Link::fromTextAndUrl("[Force-Directed Graph with Links to Source Data]", Url::fromroute('islandora_herbarium_object.graph', $link_fdg_source = Link::fromTextAndUrl("[Force-Directed Graph with Links to External Source Data]", Url::fromroute('islandora_herbarium_object.graph',
['scientificName' => $scientificName, 'municipality' => $municipality, 'uri_endpoint' => 'source'])); ['scientificName' => $scientificName, 'municipality' => $municipality, 'uri_endpoint' => 'source']));
$link_fdg_solr = Link::fromTextAndUrl("[Force-Directed Graph with Links to Solr Search]", Url::fromroute('islandora_herbarium_object.graph', $link_fdg_solr = Link::fromTextAndUrl("[Force-Directed Graph with Links to Internal Search]", Url::fromroute('islandora_herbarium_object.graph',
['scientificName' => $scientificName, 'municipality' => $municipality, 'uri_endpoint' => 'solr'])); ['scientificName' => $scientificName, 'municipality' => $municipality, 'uri_endpoint' => 'solr']));
$link = Link::fromTextAndUrl($item->value, Url::fromroute('view.herbarium_search.page_1', $link = Link::fromTextAndUrl($item->value, Url::fromroute('view.herbarium_search.page_1',
[], ['query' => ['search_api_fulltext' => '','herbarium-search[0]' => $fieldLabel . ':' . $item->value]])); [], ['query' => ['search_api_fulltext' => '','herbarium-search[0]' => $fieldLabel . ':' . $item->value]]));

Loading…
Cancel
Save