function profanity_views_handler_field::init in Profanity 7
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
File
- ./
profanity.views.inc, line 69 - Provide additional Views fields for entity content.
Class
- profanity_views_handler_field
- Field handler to provide simple renderer that allows linking to a entity. Definition terms:
Code
function init(&$view, &$options) {
parent::init($view, $options);
// Don't add the additional fields to groupby.
if (!empty($this->options['link_to_entity'])) {
$this->additional_fields['entity_info'] = array(
'table' => $this->definition['base_table'],
'field' => $this->definition['id'],
);
/*if (module_exists('translation')) {
$this->additional_fields['language'] = array('table' => 'node', 'field' => 'language');
}*/
}
// Grab and save some entity based info.
module_load_include('inc', 'entity', 'includes/entity.property');
$this->entity_type = entity_property_extract_innermost_type($this->definition['type']);
$this->entity_id_key = $this->definition['id'];
}