Magento 2 Documentation  2.3
Documentation for Magento 2 CMS v2.3 (December 2018)
InvalidateTokenButton.php
Go to the documentation of this file.
1 <?php
7 
9 
15 {
19  public function getButtonData()
20  {
21  $customerId = $this->getCustomerId();
22  $data = [];
23  if ($customerId) {
24  $deleteConfirmMsg = __("Are you sure you want to revoke the customer's tokens?");
25  $data = [
26  'label' => __('Force Sign-In'),
27  'class' => 'invalidate-token',
28  'on_click' => 'deleteConfirm("' . $deleteConfirmMsg . '", "' . $this->getInvalidateTokenUrl() . '")',
29  'sort_order' => 65,
30  ];
31  }
32  return $data;
33  }
34 
38  public function getInvalidateTokenUrl()
39  {
40  return $this->getUrl('customer/customer/invalidateToken', ['customer_id' => $this->getCustomerId()]);
41  }
42 }
__()
Definition: __.php:13