Skip to content
Snippets Groups Projects

Issue #3508731 by jsacksick: Provide service aliases for autowiring and...

59 files
+ 293
802
Compare changes
  • Side-by-side
  • Inline
Files
59
@@ -14,32 +14,15 @@ use Drupal\commerce_cart\CartProviderInterface;
*/
class CartCacheContext implements CacheContextInterface {
/**
* The current user.
*
* @var \Drupal\Core\Session\AccountInterface
*/
protected $account;
/**
* The cart provider service.
*
* @var \Drupal\commerce_cart\CartProviderInterface
*/
protected $cartProvider;
/**
* Constructs a new CartCacheContext object.
*
* @param \Drupal\Core\Session\AccountInterface $account
* The current user account.
* @param \Drupal\commerce_cart\CartProviderInterface $cart_provider
* @param \Drupal\commerce_cart\CartProviderInterface $cartProvider
* The cart provider service.
*/
public function __construct(AccountInterface $account, CartProviderInterface $cart_provider) {
$this->account = $account;
$this->cartProvider = $cart_provider;
}
public function __construct(protected AccountInterface $account, protected CartProviderInterface $cartProvider) {}
/**
* {@inheritdoc}
Loading