You are here

public function OpignoModuleManagerController::addActivityToModule in Opigno module 8

Same name and namespace in other branches
  1. 3.x src/Controller/OpignoModuleManagerController.php \Drupal\opigno_module\Controller\OpignoModuleManagerController::addActivityToModule()

Add existing activity to the module.

1 string reference to 'OpignoModuleManagerController::addActivityToModule'
opigno_module.routing.yml in ./opigno_module.routing.yml
opigno_module.routing.yml

File

src/Controller/OpignoModuleManagerController.php, line 564

Class

OpignoModuleManagerController
Controller for all the actions of the Opigno module manager.

Namespace

Drupal\opigno_module\Controller

Code

public function addActivityToModule(OpignoModule $opigno_module, OpignoActivity $opigno_activity, $group = NULL) {
  $opigno_module_controller = \Drupal::service('opigno_module.opigno_module');
  $opigno_module_controller
    ->activitiesToModule([
    $opigno_activity,
  ], $opigno_module, $group);
  return new JsonResponse([], Response::HTTP_OK);
}