protected function Record::getIdentifier in Views OAI-PMH 8
The identifier for record header
Parameters
$id:
Return value
string format: oai:domain/nid
1 call to Record::getIdentifier()
- Record::render in src/
Plugin/ views/ style/ Record.php - Render the display in this style.
File
- src/
Plugin/ views/ style/ Record.php, line 252
Class
- Record
- Plugin annotation @ViewsStyle( id = "views_oai_pmh_record", title = @Translation("OAI-PMH"), help = @Translation("Displays rows in OAI-PMH records."), display_types = {"oai_pmh"} )
Namespace
Drupal\views_oai_pmh\Plugin\views\styleCode
protected function getIdentifier($id) {
$path = "";
if (strpos($id, 'https://') !== false) {
$path = str_replace("https://", "oai:", $id);
}
else {
if (strpos($id, 'http://') !== false) {
$path = str_replace("http://", "oai:", $id);
}
}
return $path;
}