You are here

function biblio_pm_biblio_node_table_rows_alter in Bibliography Module 7

File

modules/pubmed/biblio_pm.module, line 561

Code

function biblio_pm_biblio_node_table_rows_alter(&$rows, $node) {
  if (isset($node->biblio_pubmed_id) && !empty($node->biblio_pubmed_id)) {
    $rows[] = array(
      array(
        'data' => t('PubMed ID'),
        'class' => array(
          'biblio-row-title',
        ),
      ),
      array(
        'data' => l($node->biblio_pubmed_id, 'https://www.ncbi.nlm.nih.gov/pubmed/' . $node->biblio_pubmed_id . '?dopt=Abstract'),
      ),
    );
  }
  if (isset($node->biblio_pmcid) && !empty($node->biblio_pmcid)) {
    $rows[] = array(
      array(
        'data' => t('PubMed Central ID'),
        'class' => array(
          'biblio-row-title',
        ),
      ),
      array(
        'data' => check_plain($node->biblio_pmcid),
      ),
    );
  }
  if (isset($node->biblio_pubmed_grants) && is_array($node->biblio_pubmed_grants)) {
    foreach ($node->biblio_pubmed_grants as $grant) {
      $list[] = check_plain(implode(' / ', $grant));
    }
    $rows[] = array(
      array(
        'data' => t('Grant List'),
        'class' => array(
          'biblio-row-title',
        ),
      ),
      array(
        'data' => implode('<br>', $list),
      ),
    );
  }
}