class BiblioStyleEndNote in Bibliography Module 7.3
@file EndNote tagged biblio style.
Hierarchy
- class \BiblioStyleBase implements BiblioStyleInterface
- class \BiblioStyleEndNote
Expanded class hierarchy of BiblioStyleEndNote
1 string reference to 'BiblioStyleEndNote'
- endnote.inc in plugins/
biblio_style/ endnote/ endnote.inc
File
- plugins/
biblio_style/ endnote/ BiblioStyleEndNote.class.php, line 8 - EndNote tagged biblio style.
View source
class BiblioStyleEndNote extends BiblioStyleBase {
public function settingsForm() {
$form['type'] = array(
'#type' => 'select',
'#title' => t('Type'),
'#required' => TRUE,
'#options' => array(
'tagged' => t('Tagged'),
'xml' => t('XML'),
),
'#default_value' => 'tagged',
);
return $form;
}
/**
* @inheritdoc
*/
public function importData($data, $options = array()) {
$options += array(
'type' => 'tagged',
);
$class_name = FALSE;
if ($options['type'] == 'tagged') {
$class_name = 'BiblioStyleEndNoteTagged';
}
else {
// This is an XML, and we need to get the format (EndNote 7 or EndNote 8).
if (strpos($data, 'record') !== FALSE && strpos($data, 'ref-type') !== FALSE) {
$class_name = 'BiblioStyleEndNoteXML8';
}
elseif (strpos($data, 'RECORD') !== FALSE && strpos($data, 'REFERENCE_TYPE') !== FALSE) {
$class_name = 'BiblioStyleEndNoteXML7';
}
}
if (!$class_name) {
return;
}
$handler = new $class_name($this->plugin, $this->biblio);
return $handler
->importData($data, $options);
}
/**
* @inheritdoc
*/
public function render($options = array(), $langcode = NULL) {
$options += array(
'type' => 'tagged',
);
switch ($options['type']) {
case 'xml':
$class_name = 'BiblioStyleEndNoteXML8';
break;
default:
$class_name = 'BiblioStyleEndNoteTagged';
break;
}
$handler = new $class_name($this->plugin, $this->biblio);
return $handler
->render($options, $langcode);
}
}
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 | @todo: Make abstract function? | 4 |
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 | ||
BiblioStyleBase:: |
public | function |
Constructor for the notifier. Overrides BiblioStyleInterface:: |
|
BiblioStyleEndNote:: |
public | function | @inheritdoc | 2 |
BiblioStyleEndNote:: |
public | function |
@inheritdoc Overrides BiblioStyleBase:: |
2 |
BiblioStyleEndNote:: |
public | function |
Overrides BiblioStyleBase:: |