public function apachesolr_views_handler_field_generic::set_definition in Apache Solr Views 6
Loads the base handler and loads it with the specified definition. Throws an exception if unsuccessful.
File
- handlers/
apachesolr_views_handler_field_generic.inc, line 80
Class
- apachesolr_views_handler_field_generic
- Class for retrieving and rendering an arbitrary field from an Apache Solr query. The class uses a predefined handler to which it acts as a proxy.
Code
public function set_definition($definition) {
if (empty($definition['apachesolr base handler'])) {
watchdog('views', 'no base handler specified for apachesolr field handler', array(), WATCHDOG_ERROR);
}
$o = $definition['apachesolr base handler'];
$this->_original = views_get_handler($o['table'], $o['field'], 'field');
if (empty($this->_original)) {
watchdog('views', 'invalid base handler specified for apachesolr field handler: ' . $o['table'] . '/' . $o['field'], array(), WATCHDOG_ERROR);
}
// Give the original handler the correct definition.
$this->_original
->set_definition($definition);
}