ILIAS  Release_5_0_x_branch Revision 61816
 All Data Structures Namespaces Files Functions Variables Groups Pages
ilBibliographicSetting Class Reference

Class ilBibliographicSetting. More...

+ Inheritance diagram for ilBibliographicSetting:
+ Collaboration diagram for ilBibliographicSetting:

Public Member Functions

 getConnectorContainerName ()
 generateLibraryLink (ilBibliographicEntry $entry, $type)
 getButton (ilObjBibliographic $bibl_obj, ilBibliographicEntry $entry)
 getId ()
 setId ($id)
 getImg ()
 setImg ($img)
 getName ()
 setName ($name)
 getShowInList ()
 setShowInList ($show_in_list)
 getUrl ()
 setUrl ($url)
- Public Member Functions inherited from ActiveRecord
 getArConnector ()
 getArFieldList ()
 setConnectorContainerName ($connector_container_name)
 getPrimaryFieldValue ()
 setPrimaryFieldValue ($value)
 __construct ($primary_key=0, arConnector $connector=NULL)
 storeObjectToCache ()
 __getConvertedDateFieldsAsArray ($format=NULL)
 __asCsv ($separator= ';', $header=false)
 __asArray ()
 __asStdClass ()
 __asSerializedObject ()
 buildFromArray (array $array)
 sleep ($field_name)
 wakeUp ($field_name, $field_value)
 getArrayForDb ()
 getArrayForConnector ()
 installConnector ()
 store ()
 save ()
 create ()
 copy ($new_id=0)
 afterObjectLoad ()
 read ()
 update ()
 delete ()
 __call ($name, $arguments)

Static Public Member Functions

static returnDbTableName ()
static getAll ()
- Static Public Member Functions inherited from ActiveRecord
static installDB ()
static renameDBField ($old_name, $new_name)
static tableExists ()
static fieldExists ($field_name)
static removeDBField ($field_name)
static updateDB ()
static resetDB ()
static truncateDB ()
static flushDB ()
static preloadObjects ()
static additionalParams (array $additional_params)
static findOrFail ($primary_key, array $add_constructor_args=array())
 Tries to find the object and throws an Exception if object is not found, instead of returning null.
static findOrGetInstance ($primary_key, array $add_constructor_args=array())
static where ($where, $operator=NULL)
static innerjoinAR (ActiveRecord $ar, $on_this, $on_external, $fields=array( '*'), $operator= '=', $both_external=false)
static innerjoin ($tablename, $on_this, $on_external, $fields=array( '*'), $operator= '=', $both_external=false)
static leftjoin ($tablename, $on_this, $on_external, $fields=array( '*'), $operator= '=', $both_external=false)
static orderBy ($orderBy, $orderDirection= 'ASC')
static dateFormat ($date_format= 'd.m.Y-H:i:s')
static limit ($start, $end)
static affectedRows ()
static count ()
static get ()
static debug ()
static first ()
static getCollection ()
static last ()
static getFirstFromLastQuery ()
static connector (arConnector $connector)
static raw ($set_raw=true)
static getArray ($key=NULL, $values=NULL)
static _toCamelCase ($str, $capitalise_first_char=false)

Data Fields

const TABLE_NAME = 'il_bibl_settings'
- Data Fields inherited from ActiveRecord
const ACTIVE_RECORD_VERSION = '2.0.7'

Protected Attributes

 $id
 $name
 $url
 $img
 $show_in_list
- Protected Attributes inherited from ActiveRecord
 $ar_safe_read = true
 $connector_container_name = ''

Private Member Functions

 formatAttribute ($a, $type, $attributes, $prefix)

Additional Inherited Members

- Protected Member Functions inherited from ActiveRecord
 serializeToCSV ($field)
 This method is called for every field of your instance if you use __asCsv.
 installDatabase ()
- Static Protected Member Functions inherited from ActiveRecord
static getCalledClass ()
static fromCamelCase ($str)

Detailed Description

Member Function Documentation

ilBibliographicSetting::formatAttribute (   $a,
  $type,
  $attributes,
  $prefix 
)
private
Parameters
String$a
String$type
Array$attributes
String$prefix
Returns
String

Definition at line 176 of file class.ilBibliographicSetting.php.

Referenced by generateLibraryLink().

{
if ($type = 'ris') {
switch ($a) {
case 'ti':
$a = "title";
break;
case 't1':
$a = "title";
break;
case 'au':
$a = "author";
break;
case 'sn':
if (strlen($attributes[$prefix . "sn"]) <= 9) {
$a = "issn";
} else {
$a = "isbn";
}
break;
case 'py':
$a = "date";
break;
case 'is':
$a = "issue";
break;
case 'vl':
$a = "volume";
break;
}
} elseif ($type = 'bib') {
switch ($a) {
case "number":
$a = "issue";
break;
case "year":
$a = "date";
break;
}
}
return $a;
}

+ Here is the caller graph for this function:

ilBibliographicSetting::generateLibraryLink ( ilBibliographicEntry  $entry,
  $type 
)
Parameters
ilBibliographicEntry$entry
string$type(bib|ris)
Returns
string

Definition at line 98 of file class.ilBibliographicSetting.php.

References formatAttribute(), ilBibliographicEntry\getAttributes(), ilBibliographicEntry\getType(), and getUrl().

Referenced by getButton().

{
$attributes = $entry->getAttributes();
switch ($type) {
case 'bib':
$prefix = "bib_default_";
if (!empty($attributes[$prefix . "isbn"])) {
$attr = Array( "isbn" );
} elseif (!empty($attributes[$prefix . "issn"])) {
$attr = Array( "issn" );
} else {
$attr = Array( "title", "author", "year", "number", "volume" );
}
break;
case 'ris':
$prefix = "ris_" . strtolower($entry->getType()) . "_";
if (!empty($attributes[$prefix . "sn"])) {
$attr = Array( "sn" );
} else {
$attr = Array( "ti", "t1", "au", "py", "is", "vl" );
}
break;
}
$url_params = "?";
if (sizeof($attr) == 1) {
$url_params .= $this->formatAttribute($attr[0], $type, $attributes, $prefix) . "=" . urlencode($attributes[$prefix . $attr[0]]);
} else {
foreach ($attr as $a) {
if (array_key_exists($prefix . $a, $attributes)) {
if (strlen($url_params) > 1) {
$url_params .= "&";
}
$url_params .= $this->formatAttribute($a, $type, $attributes, $prefix) . "=" . urlencode($attributes[$prefix . $a]);
}
}
}
// return full link
$full_link = $this->getUrl() . $url_params;
return $full_link;
}

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

static ilBibliographicSetting::getAll ( )
static
Returns
ilBibliographicSetting[]

Definition at line 87 of file class.ilBibliographicSetting.php.

References ActiveRecord\get().

Referenced by ilDataBibliographicRecordListTableGUI\fillRow(), and ilObjBibliographicAdminLibrariesGUI\initTable().

{
return self::get();
}

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

ilBibliographicSetting::getButton ( ilObjBibliographic  $bibl_obj,
ilBibliographicEntry  $entry 
)
Parameters
ilObjBibliographic$bibl_obj
ilBibliographicEntry$entry
Returns
string

Definition at line 148 of file class.ilBibliographicSetting.php.

References generateLibraryLink(), ilObjBibliographic\getFiletype(), getImg(), ilImageLinkButton\getInstance(), and ilLinkButton\getInstance().

{
if ($this->getImg()) {
require_once('./Services/UIComponent/Button/classes/class.ilImageLinkButton.php');
$button->setUrl($this->generateLibraryLink($entry, $bibl_obj->getFiletype()));
$button->setImage($this->getImg(), false);
$button->setTarget('_blank');
return $button->render();
} else {
require_once('./Services/UIComponent/Button/classes/class.ilLinkButton.php');
$button->setUrl($this->generateLibraryLink($entry, $bibl_obj->getFiletype()));
$button->setTarget('_blank');
$button->setCaption('bibl_link_online');
return $button->render();
}
}

+ Here is the call graph for this function:

ilBibliographicSetting::getConnectorContainerName ( )
Returns
string

Reimplemented from ActiveRecord.

Definition at line 31 of file class.ilBibliographicSetting.php.

References TABLE_NAME.

{
}
ilBibliographicSetting::getId ( )
Returns
mixed

Definition at line 223 of file class.ilBibliographicSetting.php.

References $id.

{
return $this->id;
}
ilBibliographicSetting::getImg ( )
Returns
mixed

Definition at line 239 of file class.ilBibliographicSetting.php.

References $img.

Referenced by getButton().

{
return $this->img;
}

+ Here is the caller graph for this function:

ilBibliographicSetting::getName ( )
Returns
mixed

Definition at line 255 of file class.ilBibliographicSetting.php.

References $name.

{
return $this->name;
}
ilBibliographicSetting::getShowInList ( )
Returns
mixed

Definition at line 271 of file class.ilBibliographicSetting.php.

References $show_in_list.

{
}
ilBibliographicSetting::getUrl ( )
Returns
mixed

Definition at line 287 of file class.ilBibliographicSetting.php.

References $url.

Referenced by generateLibraryLink().

{
return $this->url;
}

+ Here is the caller graph for this function:

static ilBibliographicSetting::returnDbTableName ( )
static
Returns
string
Deprecated:

Reimplemented from ActiveRecord.

Definition at line 23 of file class.ilBibliographicSetting.php.

References TABLE_NAME.

{
}
ilBibliographicSetting::setId (   $id)
Parameters
mixed$id

Definition at line 231 of file class.ilBibliographicSetting.php.

References $id.

{
$this->id = $id;
}
ilBibliographicSetting::setImg (   $img)
Parameters
mixed$img

Definition at line 247 of file class.ilBibliographicSetting.php.

References $img.

{
$this->img = $img;
}
ilBibliographicSetting::setName (   $name)
Parameters
mixed$name

Definition at line 263 of file class.ilBibliographicSetting.php.

References $name.

{
$this->name = $name;
}
ilBibliographicSetting::setShowInList (   $show_in_list)
Parameters
mixed$show_in_list

Definition at line 279 of file class.ilBibliographicSetting.php.

References $show_in_list.

{
$this->show_in_list = $show_in_list;
}
ilBibliographicSetting::setUrl (   $url)
Parameters
mixed$url

Definition at line 295 of file class.ilBibliographicSetting.php.

References $url.

{
$this->url = $url;
}

Field Documentation

ilBibliographicSetting::$id
protected

Definition at line 47 of file class.ilBibliographicSetting.php.

Referenced by getId(), and setId().

ilBibliographicSetting::$img
protected

Definition at line 73 of file class.ilBibliographicSetting.php.

Referenced by getImg(), and setImg().

ilBibliographicSetting::$name
protected

Definition at line 56 of file class.ilBibliographicSetting.php.

Referenced by getName(), and setName().

ilBibliographicSetting::$show_in_list
protected

Definition at line 81 of file class.ilBibliographicSetting.php.

Referenced by getShowInList(), and setShowInList().

ilBibliographicSetting::$url
protected

Definition at line 65 of file class.ilBibliographicSetting.php.

Referenced by getUrl(), and setUrl().

const ilBibliographicSetting::TABLE_NAME = 'il_bibl_settings'

The documentation for this class was generated from the following file: