You are here

function mediafront_plugin_style_player::render in MediaFront 7.2

Same name and namespace in other branches
  1. 6.2 views/mediafront_plugin_style_player.inc \mediafront_plugin_style_player::render()
  2. 6 views/mediafront_plugin_style_player.inc \mediafront_plugin_style_player::render()
  3. 7 views/mediafront_plugin_style_player.inc \mediafront_plugin_style_player::render()

Renders the media player.

Overrides views_plugin_style::render

File

views/mediafront_plugin_style_player.inc, line 68
This file holds style plugin for MediaFront Views

Class

mediafront_plugin_style_player
@class Extension of the Views Plugin Syle for the Media Player from MediaFront

Code

function render() {
  if (empty($this->options['mediafront_preset'])) {
    return t('You must select a preset for the MediaFront Player style in the view.');
  }

  // Now render the media player for this view.
  return mediafront_get_player($this->options['mediafront_preset'], array(
    'id' => mediafront_views_get_id($this->view),
    'playlist' => mediafront_get_playlist_from_view($this->view),
  ));
}