You are here

public function OSMPlayer::setPrefix in MediaFront 7

Same name and namespace in other branches
  1. 6.2 players/osmplayer/player/OSMPlayer.php \OSMPlayer::setPrefix()
  2. 6 players/osmplayer/player/OSMPlayer.php \OSMPlayer::setPrefix()

Set the prefix for the CSS of this media player.

1 call to OSMPlayer::setPrefix()
OSMPlayer::__construct in players/osmplayer/player/OSMPlayer.php
Constructor.

File

players/osmplayer/player/OSMPlayer.php, line 301

Class

OSMPlayer
PHP wrapper class for the Open Standard Media (OSM) player.

Code

public function setPrefix($newPrefix) {

  // We only need to set the prefix if we generate the CSS.
  if ($this->template->settings['generateCSS']) {

    // Set the prefix.
    $this->settings['prefix'] = $newPrefix;

    // Set the template prefix.
    $this->template
      ->setPrefix($newPrefix);
  }
  else {
    $this->settings['prefix'] = '';
    $this->template
      ->setPrefix('');
  }
}