You are here

public static function AssetManager::pluginIsInstalled in CKEditor Media Embed Plugin 8

Determine if the specified plugin is installed.

Parameters

string $plugin_name: The name of the plugin to check installation.

Return value

bool Returns TRUE if the specfied CKEditor plugin is installed and FALSE otherwise.

3 calls to AssetManager::pluginIsInstalled()
AssetManager::getPluginsInstallStatuses in src/AssetManager.php
Retrieve the install status of all CKEditor plugins.
AssetManager::pluginsAreInstalled in src/AssetManager.php
Determine if all our CKEditor plugins are installed.
AssetManagerTest::testPluginIsInstalled in tests/src/Unit/AssetManagerTest.php
Tests \Drupal\ckeditor_media_embed\AssetManager::pluginIsInstalled().

File

src/AssetManager.php, line 97

Class

AssetManager
The AssetManager facade for managing CKEditor plugins.

Namespace

Drupal\ckeditor_media_embed

Code

public static function pluginIsInstalled($plugin_name) {
  $is_installed = FALSE;
  $library_plugin_path = self::getCKEditorLibraryPluginDirectory() . $plugin_name;
  if (is_dir($library_plugin_path) && is_file($library_plugin_path . '/plugin.js')) {
    $is_installed = TRUE;
  }
  return $is_installed;
}