getLibraryByName('colorbox', 'colorbox'); $library_exists = file_exists(DRUPAL_ROOT . '/' . $library['js'][0]['data']); return [ 'colorbox_library_downloaded' => [ 'title' => t('Colorbox library'), 'value' => $library_exists ? t('Installed') : t('Not installed'), 'description' => $library_exists ? '' : t('The Colorbox library needs to be downloaded and extracted into the /libraries/colorbox folder in your Drupal installation directory.', ['@url' => 'https://github.com/jackmoore/colorbox/archive/master.zip']), 'severity' => $library_exists ? REQUIREMENT_OK : REQUIREMENT_ERROR, ], ]; }