You are here

function TestController::addToCart in Translation Management Tool 8

Callback to add given job item into the cart.

1 string reference to 'TestController::addToCart'
tmgmt_test.routing.yml in tmgmt_test/tmgmt_test.routing.yml
tmgmt_test/tmgmt_test.routing.yml

File

tmgmt_test/src/TestController.php, line 17

Class

TestController
Test controller.

Namespace

Drupal\tmgmt_test

Code

function addToCart(JobItemInterface $tmgmt_job_item) {
  tmgmt_cart_get()
    ->addExistingJobItems(array(
    $tmgmt_job_item,
  ));
  return new Response('', 204);
}