You are here

public function BiblioStyleBase::renderEntryFiles in Bibliography Module 7.3

1 call to BiblioStyleBase::renderEntryFiles()
BiblioStyleBibtex::formatFiles in plugins/biblio_style/bibtex/BiblioStyleBibtex.class.php
File format entry.

File

plugins/biblio_style/abstract.inc, line 171

Class

BiblioStyleBase
An abstract implementation of MessageNotifierInterface.

Code

public function renderEntryFiles(EntityMetadataWrapper $wrapper, $property_name = 'biblio_pdf') {
  if (!user_access('view uploaded files')) {
    return;
  }
  if (!($files = $wrapper->{$property_name}
    ->value())) {
    return;
  }
  $url = array();
  $files = !isset($files['fid']) ? $files : array(
    $files,
  );
  foreach ($files as $file) {
    $url[] = file_create_url($file['uri']);
  }
  return $url;
}