class mediafront_plugin_style_player in MediaFront 6.2
Same name and namespace in other branches
- 6 views/mediafront_plugin_style_player.inc \mediafront_plugin_style_player
- 7.2 views/mediafront_plugin_style_player.inc \mediafront_plugin_style_player
- 7 views/mediafront_plugin_style_player.inc \mediafront_plugin_style_player
@class Extension of the Views Plugin Syle for the Media Player from MediaFront
This class extended the default views plugin class to provide a style plugin for the MediaFront module.
Hierarchy
- class \mediafront_plugin_style_player extends \views_plugin_style
Expanded class hierarchy of mediafront_plugin_style_player
2 string references to 'mediafront_plugin_style_player'
- mediafront_views_plugins in views/
mediafront.views.inc - Implementation of hook_views_plugins
- mediafront_views_query_alter in ./
mediafront.module - Implements hook_views_query_alter().
File
- views/
mediafront_plugin_style_player.inc, line 17 - This file holds style plugin for MediaFront Views
View source
class mediafront_plugin_style_player extends views_plugin_style {
/**
* Set the default options.
*/
function option_definition() {
$options = parent::option_definition();
$options['mediafront_preset'] = array(
'default' => '',
);
return $options;
}
/**
* Shows the options form for the media player style
*/
function options_form(&$form, &$form_state) {
parent::options_form($form, $form_state);
$form['mediafront_preset'] = mediafront_preset_select_form($this->options);
}
/**
* Override the query to tell our view to get the total number of rows.
*/
function query() {
parent::query();
$this->view->get_total_rows = TRUE;
}
/**
* Renders the media player.
*/
function render() {
$output = '';
// Check for live preview.
if (!empty($this->view->live_preview)) {
return t('MediaFront views are not compatible with live preview.');
}
// Now render the media player for this view.
return theme($this
->theme_functions(), $this->view, $this->options['mediafront_preset']);
}
}
Members
Name | Modifiers | Type | Description | Overrides |
---|---|---|---|---|
mediafront_plugin_style_player:: |
function | Shows the options form for the media player style | ||
mediafront_plugin_style_player:: |
function | Set the default options. | ||
mediafront_plugin_style_player:: |
function | Override the query to tell our view to get the total number of rows. | ||
mediafront_plugin_style_player:: |
function | Renders the media player. |