You are here

public function YamlFormLibrariesManager::getLibraries in YAML Form 8

Get libraries.

Return value

array An associative array of libraries.

Overrides YamlFormLibrariesManagerInterface::getLibraries

1 call to YamlFormLibrariesManager::getLibraries()
YamlFormLibrariesManager::requirements in src/YamlFormLibrariesManager.php
Get third party libraries status for hook_requirements and drush.

File

src/YamlFormLibrariesManager.php, line 91

Class

YamlFormLibrariesManager
Form libraries manager.

Namespace

Drupal\yamlform

Code

public function getLibraries($category = NULL) {
  $libraries = $this->libraries;
  if ($category) {
    foreach ($libraries as $project_name => $project) {
      if ($project['category'] != $category) {
        unset($libraries[$project_name]);
      }
    }
  }
  return $libraries;
}