You are here

public static function Util::checkMissingLibrary in Charts 5.0.x

Same name and namespace in other branches
  1. 8.4 src/Util/Util.php \Drupal\charts\Util\Util::checkMissingLibrary()
  2. 8.3 src/Util/Util.php \Drupal\charts\Util\Util::checkMissingLibrary()

Checks for missing libraries necessary for data visualization.

Parameters

string $libraryPath: Library Path.

File

src/Util/Util.php, line 142

Class

Util
Util.

Namespace

Drupal\charts\Util

Code

public static function checkMissingLibrary($libraryPath = '') {
  if (!file_exists(DRUPAL_ROOT . DIRECTORY_SEPARATOR . $libraryPath)) {
    \Drupal::service('messenger')
      ->addMessage(t('Charting libraries might not be installed at the location @libraryPath.', [
      '@libraryPath' => $libraryPath,
    ]), 'error');
  }
}