class BiblioStyleExampleCiteProc in Bibliography Module 7.3
@file Extending Citeproc biblio style example.
Hierarchy
- class \BiblioStyleBase implements BiblioStyleInterface
- class \BiblioStyleCiteProc
- class \BiblioStyleExampleCiteProc
- class \BiblioStyleCiteProc
Expanded class hierarchy of BiblioStyleExampleCiteProc
1 string reference to 'BiblioStyleExampleCiteProc'
- example_citeproc.inc in modules/
biblio_example/ plugins/ biblio_style/ example_citeproc/ example_citeproc.inc
File
- modules/
biblio_example/ plugins/ biblio_style/ example_citeproc/ BiblioStyleExampleCiteProc.class.php, line 8 - Extending Citeproc biblio style example.
View source
class BiblioStyleExampleCiteProc extends BiblioStyleCiteProc {
public function render($options = array(), $langcode = NULL) {
$output = parent::render($options, $langcode);
// Get abstract.
$wrapper = entity_metadata_wrapper('biblio', $this->biblio);
$abstract = isset($wrapper->biblio_abstract) ? $wrapper->biblio_abstract
->value() : '';
$items = array();
$options = array(
'attributes' => array(
'class' => 'publication-pdf',
),
);
foreach ($wrapper->biblio_pdf
->value() as $pdf_file) {
$url = file_create_url($pdf_file['uri']);
$items[] = l($pdf_file['filename'], $url, $options);
}
$image = $wrapper->biblio_image
->value();
$variables = array(
'bid' => $wrapper
->getIdentifier(),
'image' => theme('image', array(
'path' => $image['uri'],
'width' => 50,
'height' => 50,
)),
'title' => $this->biblio->title,
'abstract' => $abstract,
'pdf_list' => theme('item_list', array(
'items' => $items,
)),
);
return theme('biblio_example_citeproc', $variables);
}
}
Members
Name | Modifiers | Type | Description | Overrides |
---|---|---|---|---|
BiblioStyleBase:: |
protected | property | The Biblio entity. | |
BiblioStyleBase:: |
protected | property | The plugin definition. | |
BiblioStyleBase:: |
public static | function | Generates an md5 string based on a biblio object. The md5 is later used to determine whether or not two Biblio objects are the same and prevent duplications. | |
BiblioStyleBase:: |
public | function | Returns Biblio Publication Type based on Publication Type. | |
BiblioStyleBase:: |
public | function | Entry point for data import. | |
BiblioStyleBase:: |
public | function | Helper function to import existing or new keywords. | |
BiblioStyleBase:: |
public | function | Searches for a biblio object identical to the given one. | |
BiblioStyleBase:: |
public | function | ||
BiblioStyleBase:: |
public | function | Given a of successful import, find duplicates or save the new Biblios. | |
BiblioStyleBase:: |
public | function | 1 | |
BiblioStyleBase:: |
public | function | ||
BiblioStyleBase:: |
public | function |
Constructor for the notifier. Overrides BiblioStyleInterface:: |
|
BiblioStyleCiteProc:: |
public | function |
@todo: Make abstract function? Overrides BiblioStyleBase:: |
|
BiblioStyleCiteProc:: |
public | function | Map the fields from the Biblio entity to the ones known by CiteProc. | |
BiblioStyleExampleCiteProc:: |
public | function |
Render the Biblio according to the style plugin. Overrides BiblioStyleCiteProc:: |