class LibraryWrapper in Module Builder 8.3
Quick and dirty wrapper class to load our library.
TODO: Remove this.
Hierarchy
- class \Drupal\module_builder\LibraryWrapper
Expanded class hierarchy of LibraryWrapper
1 file declares its use of LibraryWrapper
- module_builder.install in ./
module_builder.install - module_builder.install Contains install hooks.
File
- src/
LibraryWrapper.php, line 10
Namespace
Drupal\module_builderView source
class LibraryWrapper {
/**
* Loads the Drupal Coder Builder library and sets the environment.
*
* @throws
* Throws an exception if the library can't be found.
*/
public static function loadLibrary() {
if (!class_exists(\DrupalCodeBuilder\Factory::class)) {
throw new \Exception("Mising library.");
}
// TODO: add an environment class with a more appropriate name.
\DrupalCodeBuilder\Factory::setEnvironmentLocalClass('DrupalLibrary')
->setCoreVersionNumber(\Drupal::VERSION);
}
}
Members
Name | Modifiers | Type | Description | Overrides |
---|---|---|---|---|
LibraryWrapper:: |
public static | function | Loads the Drupal Coder Builder library and sets the environment. |