You are here

public function CartController::thankYouPage in Basic cart 8.5

Same name and namespace in other branches
  1. 8.6 src/Controller/CartController.php \Drupal\basic_cart\Controller\CartController::thankYouPage()
  2. 8 src/Controller/CartController.php \Drupal\basic_cart\Controller\CartController::thankYouPage()
  3. 8.0 src/Controller/CartController.php \Drupal\basic_cart\Controller\CartController::thankYouPage()
  4. 8.2 src/Controller/CartController.php \Drupal\basic_cart\Controller\CartController::thankYouPage()
  5. 8.3 src/Controller/CartController.php \Drupal\basic_cart\Controller\CartController::thankYouPage()
  6. 8.4 src/Controller/CartController.php \Drupal\basic_cart\Controller\CartController::thankYouPage()

Thankyou Page.

Return value

array Returns Drupal markup

1 string reference to 'CartController::thankYouPage'
basic_cart.routing.yml in ./basic_cart.routing.yml
basic_cart.routing.yml

File

src/Controller/CartController.php, line 184

Class

CartController
Contains the cart controller.

Namespace

Drupal\basic_cart\Controller

Code

public function thankYouPage() {
  $utility = new Utility();
  $config = $utility
    ->checkoutSettings();
  return array(
    '#type' => 'markup',
    '#theme' => 'basic_cart_thank_you',
    '#basic_cart' => [
      'title' => $config
        ->get('thankyou')['title'],
      'text' => $config
        ->get('thankyou')['text'],
    ],
  );
}