You are here

private function AjaxCartHelper::__construct in Ajax Add to Cart 8

Private constructor to avoid instantiation.

File

src/Helper/AjaxCartHelper.php, line 56

Class

AjaxCartHelper
Class AjaxCartHelper.

Namespace

Drupal\ajax_add_to_cart\Helper

Code

private function __construct() {
  $this->container = Drupal::getContainer();
  $this->cartBlock = $this
    ->getCartBlock($this->container);
  $this->configFactory = $this->container
    ->get('config.factory');
  $this->messenger = $this->container
    ->get('messenger');
}