function _plupload_requirements_installed in Plupload integration 8
Same name and namespace in other branches
- 7.2 plupload.install \_plupload_requirements_installed()
- 7 plupload.install \_plupload_requirements_installed()
- 2.0.x plupload.install \_plupload_requirements_installed()
Checks wether Plupload library exists or not.
Return value
bool TRUE if plupload library installed, FALSE otherwise.
1 call to _plupload_requirements_installed()
- plupload_requirements in ./
plupload.install - Implements hook_requirements().
File
- ./
plupload.install, line 69 - Install, update and uninstall functions for the Plupload module.
Code
function _plupload_requirements_installed() {
$libraries = \Drupal::service('library.discovery')
->getLibrariesByExtension('plupload');
$library = $libraries['plupload'];
// We grab the first file and check if it exists.
if (!file_exists($library['js'][0]['data'])) {
return FALSE;
}
return TRUE;
}