You are here

public function DrupalCodeBuilder::getTask in Module Builder 8.3

Gets a task handler from the library.

Same parameters as \DrupalCodeBuilder\Factory::getTask().

Parameters

string $task_name: The task name.

mixed $task_options: (optional) Options for the task.

Return value

The task object.

File

src/DrupalCodeBuilder.php, line 30

Class

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

Namespace

Drupal\module_builder

Code

public function getTask($task_name, $task_options = NULL) {
  if (!$this->loaded) {
    $this
      ->loadLibrary();
  }
  return \DrupalCodeBuilder\Factory::getTask($task_name, $task_options);
}