Magento 2 Documentation  2.3
Documentation for Magento 2 CMS v2.3 (December 2018)
CartTab.php
Go to the documentation of this file.
1 <?php
7 
12 
19 class CartTab extends TabWrapper
20 {
26  protected $coreRegistry = null;
27 
31  protected $isAjaxLoaded = true;
32 
40  public function __construct(Context $context, Registry $registry, array $data = [])
41  {
42  $this->coreRegistry = $registry;
43  parent::__construct($context, $data);
44  }
45 
49  public function canShowTab()
50  {
51  return $this->coreRegistry->registry(RegistryConstants::CURRENT_CUSTOMER_ID);
52  }
53 
59  public function getTabLabel()
60  {
61  return __('Shopping Cart');
62  }
63 
69  public function getTabUrl()
70  {
71  return $this->getUrl('customer/*/carts', ['_current' => true]);
72  }
73 }
__()
Definition: __.php:13
__construct(Context $context, Registry $registry, array $data=[])
Definition: CartTab.php:40