protected function LayoutPluginManager::getProviderVersion in Layout Plugin (obsolete, use core's Layout Discovery) 8
Gets the version of the given provider.
Wraps system_get_info() so that we can mock it in our tests.
Parameters
string $provider_type: The provider type (ex. module or theme).
string $provider: The name of the provider.
Return value
string The version string for the provider or 'VERSION' if it can't be found.
1 call to LayoutPluginManager::getProviderVersion()
- LayoutPluginManager::getLibraryInfo in src/
Plugin/ Layout/ LayoutPluginManager.php - Get library info for layouts that want to automatically register CSS.
File
- src/
Plugin/ Layout/ LayoutPluginManager.php, line 223
Class
- LayoutPluginManager
- Plugin type manager for all layouts.
Namespace
Drupal\layout_plugin\Plugin\LayoutCode
protected function getProviderVersion($provider_type, $provider) {
$info = system_get_info($provider_type, $provider);
return !empty($info['version']) ? $info['version'] : 'VERSION';
}