You are here

public function DrupalCodeBuilder::loadLibrary in Module Builder 8.3

Loads the Drupal Coder Builder library and sets the environment.

Throws

\Exception Throws an exception if the library can't be found.

1 call to DrupalCodeBuilder::loadLibrary()
DrupalCodeBuilder::getTask in src/DrupalCodeBuilder.php
Gets a task handler from the library.

File

src/DrupalCodeBuilder.php, line 44

Class

DrupalCodeBuilder
Service class that wraps around the DCB library, to make it injectable.

Namespace

Drupal\module_builder

Code

public function loadLibrary() {
  if (!class_exists(\DrupalCodeBuilder\Factory::class)) {
    throw new \Exception("Mising library.");
  }
  $this
    ->doLoadLibrary();
  $this->loaded = TRUE;
}