You are here

public static function LibrariesCDN::isAvailableCDN in Libraries CDN API 7

Same name and namespace in other branches
  1. 8 src/LibrariesCdn.php \Drupal\libraries_cdn\LibrariesCdn::isAvailableCdn()

Check if a CDN plugin is available.

Parameters

string $plugin_id: The CDN Plugin ID, defined by the key 'id' in the plugins's annotation.

Return value

bool TRUE if the plugin is available, otherwise, FALSE.

1 call to LibrariesCDN::isAvailableCDN()
libraries_cdn_add in ./libraries_cdn.module
Function to add a library to a page.

File

src/LibrariesCDN.php, line 27
Contains LibrariesCDN.

Class

LibrariesCDN
Class LibrariesCDN.

Namespace

Drupal\libraries_cdn

Code

public static function isAvailableCDN($plugin_id) {
  return in_array($plugin_id, self::getAvailableCDN());
}