class views_cumulus_style_plugin in Cumulus 6.2
Style plugin to render the results as a 3D Flash-cloud.
Hierarchy
- class \views_cumulus_style_plugin extends \views_plugin_style
Expanded class hierarchy of views_cumulus_style_plugin
1 string reference to 'views_cumulus_style_plugin'
- cumulus_views_plugins in includes/
views/ cumulus.views.inc - Implementation of hook_views_plugins().
File
- includes/
views/ views_cumulus_style_plugin.inc, line 14 - Contains the cumulus style plugin.
View source
class views_cumulus_style_plugin extends views_plugin_style {
/**
* Set default options
*/
function option_definition() {
$options = parent::option_definition();
$options += cumulus_views_options();
return $options;
}
/**
* Render the given style.
*/
function options_form(&$form, &$form_state) {
parent::options_form($form, $form_state);
cumulus_views_options_form($form, $form_state, $this);
}
function render() {
$options = $this->view->style_options;
if (empty($options['title_field'])) {
drupal_set_message(t('You have to define a title field to display items.'), 'error');
return;
}
if (!$this
->uses_fields()) {
return;
}
if (isset($this->rendered_fields)) {
return $this->rendered_fields;
}
$this->view->row_index = 0;
$keys = array_keys($this->view->field);
foreach ($this->view->result as $count => $row) {
$this->view->row_index = $count;
foreach ($keys as $id) {
$this->rendered_fields[$count][$id] = $this->view->field[$id]
->theme($row);
}
}
unset($this->view->row_index);
//dpm($this->rendered_fields);
$output .= theme($this
->theme_functions(), $this->view, $this->options, $rows, $title);
return $output;
}
}
Members
Name![]() |
Modifiers | Type | Description | Overrides |
---|---|---|---|---|
views_cumulus_style_plugin:: |
function | Render the given style. | ||
views_cumulus_style_plugin:: |
function | Set default options | ||
views_cumulus_style_plugin:: |
function |