Magento 2 Documentation  2.3
Documentation for Magento 2 CMS v2.3 (December 2018)
AbstractTokenRenderer.php
Go to the documentation of this file.
1 <?php
6 namespace Magento\Vault\Block;
7 
11 
18 {
22  private $token;
23 
27  private $tokenDetails;
28 
36  public function render(PaymentTokenInterface $token)
37  {
38  $this->token = $token;
39  $this->tokenDetails = json_decode($this->getToken()->getTokenDetails() ?: '{}', true);
40  return $this->toHtml();
41  }
42 
47  public function getToken()
48  {
49  return $this->token;
50  }
51 
56  protected function getTokenDetails()
57  {
58  return $this->tokenDetails;
59  }
60 }