public function ProjekktorAudioPlayer::getPluginLibraryVersion in AudioField 8
Parses library to get version number of installed library.
Return value
string The version number of the currently installed library.
Overrides AudioFieldPluginBase::getPluginLibraryVersion
File
- src/
Plugin/ AudioPlayer/ ProjekktorAudioPlayer.php, line 79
Class
- ProjekktorAudioPlayer
- Implements the Projekktor Audio Player plugin.
Namespace
Drupal\audiofield\Plugin\AudioPlayerCode
public function getPluginLibraryVersion() {
// Parse the JSON file for version info.
$library_path = $this->fileSystem
->realpath(DRUPAL_ROOT . $this
->getPluginLibraryPath() . '/package.json');
$library_data = Json::decode(file_get_contents($library_path));
return $library_data['version'];
}