You are here

function libraries_admin_get_provider in Libraries API 7.2

Returns the library's provider.

The provider can be a module, a theme, or an info file.

Parameters

array $library: A library information array.

Return value

string The provider.

4 calls to libraries_admin_get_provider()
drush_libraries_list in ./libraries.drush.inc
Command callback. Show a list of registered libraries.
libraries_admin_get_provider_with_type in ./libraries.admin.inc
Returns the library's provider and provider type.
libraries_admin_instructions_undetected in ./libraries.admin.inc
Returns instructions for dealing with an undetected library.
libraries_admin_instructions_unsupported in ./libraries.admin.inc
Returns instructions for dealing with an unsupported library.

File

./libraries.admin.inc, line 590
Provides administrative page and form callbacks for Libraries module.

Code

function libraries_admin_get_provider($library) {
  $provider = '';
  switch ($library['info type']) {
    case 'module':
    case 'theme':
      $info = system_get_info($library['info type'], $library[$library['info type']]);
      $provider = $info['name'];
      break;
    case 'info file':
      $provider = basename($library['info file']);
      break;
  }
  return $provider;
}