public static function LibraryWrapper::loadLibrary in Module Builder 8.3
Loads the Drupal Coder Builder library and sets the environment.
Throws
Throws an exception if the library can't be found.
1 call to LibraryWrapper::loadLibrary()
- module_builder_requirements in ./
module_builder.install - Implements hook_requirements().
File
- src/
LibraryWrapper.php, line 18
Class
- LibraryWrapper
- Quick and dirty wrapper class to load our library.
Namespace
Drupal\module_builderCode
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);
}