public function biblio_handler_field::init in Bibliography Module 7
Same name and namespace in other branches
- 6.2 views/biblio_handler_field.inc \biblio_handler_field::init()
- 6 views/biblio_handler_field.inc \biblio_handler_field::init()
- 7.2 views/biblio_handler_field.inc \biblio_handler_field::init()
Init the handler with necessary data.
Parameters
view $view: The $view object this handler is attached to.
array $options: The item from the database; the actual contents of this will vary based upon the type of handler.
Overrides views_handler_field::init
2 calls to biblio_handler_field::init()
- biblio_handler_field_contributor::init in views/
biblio_handler_field_contributor.inc - Init the handler with necessary data.
- biblio_handler_field_keyword::init in views/
biblio_handler_field_keyword.inc - Init the handler with necessary data.
2 methods override biblio_handler_field::init()
- biblio_handler_field_contributor::init in views/
biblio_handler_field_contributor.inc - Init the handler with necessary data.
- biblio_handler_field_keyword::init in views/
biblio_handler_field_keyword.inc - Init the handler with necessary data.
File
- views/
biblio_handler_field.inc, line 11
Class
Code
public function init(&$view, &$options) {
parent::init($view, $options);
if (!$this->options['biblio_label']) {
return;
}
$this->definition['click sortable'] = array(
'default' => TRUE,
);
$result = db_query("SELECT bft.tid, bftd.title FROM {biblio_field_type} bft\n INNER JOIN {biblio_fields} bf ON bft.fid=bf.fid AND bf.name = :name\n INNER JOIN {biblio_field_type_data} bftd ON bftd.ftdid=bft.ftdid", array(
':name' => $options['field'],
));
foreach ($result as $label) {
$this->labels[$label->tid] = $label->title;
}
}