You are here

function jplayer_style_plugin::validate in jPlayer 6

Same name and namespace in other branches
  1. 7.2 includes/jplayer_style_plugin.inc \jplayer_style_plugin::validate()

File

includes/jplayer_style_plugin.inc, line 53
Display style plugin for Views that renders rows as a jPlayer playlist.

Class

jplayer_style_plugin
Style plugin to display a jPlayer playlist.

Code

function validate() {
  $errors = parent::validate();

  // Ensure that we're using the field row style.
  if (!$this->row_plugin
    ->uses_fields()) {
    $errors[] = t('Display "@display" uses the "@style" row style, but the jPlayer display style requires use of the "Fields" row style.', array(
      '@display' => $this->display->display_title,
      '@style' => $this->row_plugin->definition['title'],
    ));
  }

  // Ensure that a file path field is selected.
  if (empty($this->options['path_field'])) {
    $errors[] = t('The jPlayer display style requires being configured so that at least one field is selected to provide a file path.');
  }
  return $errors;
}