You are here

function biblio_create in Bibliography Module 7.3

Same name and namespace in other branches
  1. 7.2 biblio.module \biblio_create()

Create a Biblio entity object.

Parameters

$type: The publication type of the Biblio to be created (bundle).

array $values: An associative array of any additional values to be set when creating this entity. These values will be carried throughout the biblio object's life. Example: $values['title'] => 'new publication';

Return value

Biblio The Biblio object, with default values.

7 calls to biblio_create()
BiblioAddContributorTestCase::testAddContributors in tests/AddContributor.test
Test adding contributors.
BiblioPathTestCase::testBiblioAlias in tests/Path.test
Tests alias functionality through the Biblio interfaces.
BiblioStyleBibtex::importData in plugins/biblio_style/bibtex/BiblioStyleBibtex.class.php
@inheritdoc
BiblioStyleEndNoteTagged::importData in plugins/biblio_style/endnote/BiblioStyleEndNoteTagged.php
@inheritdoc
BiblioStyleEndNoteXML8::importData in plugins/biblio_style/endnote/BiblioStyleEndNoteXML8.php
@inheritdoc

... See full list

File

./biblio.module, line 645
Maintains bibliographic lists.

Code

function biblio_create($type, $values = array()) {
  if (empty($account)) {
    global $user;
    $account = clone $user;
  }
  $values['type'] = $type;
  $values['uid'] = $account->uid;
  $values += array(
    'created' => REQUEST_TIME,
    'changed' => REQUEST_TIME,
  );
  $values['type'] = $type;
  return entity_create('biblio', $values);
}