function views_content_plugin_display_ctools_context::render
Render this display.
Overrides views_plugin_display::render
File
-
views_content/
plugins/ views/ views_content_plugin_display_ctools_context.inc, line 70
Class
- views_content_plugin_display_ctools_context
- The plugin that handles a block.
Code
public function render() {
if (!empty($this->previewing)) {
return theme($this->theme_functions(), array(
'view' => $this->view,
));
}
else {
// We want to process the view like we're theming it, but not actually
// use the template part. Therefore we run through all the preprocess
// functions which will populate the variables array.
$hooks = theme_get_registry();
$info = $hooks[$this->definition['theme']];
if (!empty($info['file'])) {
@(include_once './' . $info['path'] . '/' . $info['file']);
}
$this->variables = array(
'view' => &$this->view,
);
if (isset($info['preprocess functions']) && is_array($info['preprocess functions'])) {
foreach ($info['preprocess functions'] as $preprocess_function) {
if (function_exists($preprocess_function)) {
$preprocess_function($this->variables, $this->definition['theme']);
}
}
}
}
return $this->variables;
}