You are here

public function AudioFieldPluginBase::checkInstalled in AudioField 8

Checks to see if this audio plugin has been properly installed.

Parameters

bool $log_error: Flag to indicate whether or not alert should be logged/shown.

Return value

bool Returns a boolean indicating install state.

7 calls to AudioFieldPluginBase::checkInstalled()
AudioJsAudioPlayer::renderPlayer in src/Plugin/AudioPlayer/AudioJsAudioPlayer.php
Renders the player.
JPlayerAudioPlayer::renderPlayer in src/Plugin/AudioPlayer/JPlayerAudioPlayer.php
Renders the player.
MediaElementAudioPlayer::renderPlayer in src/Plugin/AudioPlayer/MediaElementAudioPlayer.php
Renders the player.
ProjekktorAudioPlayer::renderPlayer in src/Plugin/AudioPlayer/ProjekktorAudioPlayer.php
Renders the player.
SoundManagerAudioPlayer::renderPlayer in src/Plugin/AudioPlayer/SoundManagerAudioPlayer.php
Renders the player.

... See full list

1 method overrides AudioFieldPluginBase::checkInstalled()
DefaultMp3Player::checkInstalled in src/Plugin/AudioPlayer/DefaultMp3Player.php
Checks to see if this audio plugin has been properly installed.

File

src/AudioFieldPluginBase.php, line 201

Class

AudioFieldPluginBase
Base class for audiofield plugins. Includes global functions.

Namespace

Drupal\audiofield

Code

public function checkInstalled($log_error = TRUE) {

  // Get the main library for this plugin.
  $library = $this
    ->getPluginLibrary();

  // Check if the library is installed.
  if (file_exists(DRUPAL_ROOT . '/' . $library['js'][0]['data'])) {

    // Check to make sure the installed version is up to date.
    $this
      ->checkVersion($log_error);
    return TRUE;
  }
  return FALSE;
}