You are here

function _plupload_requirements_installed in Plupload integration 8

Same name and namespace in other branches
  1. 7.2 plupload.install \_plupload_requirements_installed()
  2. 7 plupload.install \_plupload_requirements_installed()
  3. 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;
}