Magento Extensions Rating 2024
EXTENSIONS BY CATEGORY
B2B (Business-To-Business)
Blog
Customer
ERP (Enterprise Resource Planning)
Mega Menu
One Step Checkout
Order
POS (Point Of Sale)
Search
Shopping Cart
Sitemap
SEO
Social
Stock & Inventory Management
EXTENSIONS BY DEVELOPER
aheadWorks
Amasty
Boost My Shop
BSS Commerce
Magestore
MageWorx
Mirasvit
Templates Master
Wyomind
XTENTO
Magento 2 Documentation
Magento 2 Documentation
2.3
Documentation for Magento 2 CMS v2.3 (December 2018)
vendor
magento
module-customer
Block
Adminhtml
Edit
InvalidateTokenButton.php
Go to the documentation of this file.
1
<?php
6
namespace
Magento\Customer\Block\Adminhtml\Edit
;
7
8
use
Magento\Framework\View\Element\UiComponent\Control\ButtonProviderInterface
;
9
14
class
InvalidateTokenButton
extends
GenericButton
implements
ButtonProviderInterface
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
}
Magento\Customer\Block\Adminhtml\Edit\InvalidateTokenButton
Definition:
InvalidateTokenButton.php:14
Magento\Framework\View\Element\UiComponent\Control\ButtonProviderInterface
Definition:
ButtonProviderInterface.php:11
Magento\Customer\Block\Adminhtml\Edit\GenericButton\getCustomerId
getCustomerId()
Definition:
GenericButton.php:49
Magento\Customer\Block\Adminhtml\Edit
__
__()
Definition:
__.php:13
Magento\Customer\Block\Adminhtml\Edit\GenericButton\getUrl
getUrl($route='', $params=[])
Definition:
GenericButton.php:61
Magento\Customer\Block\Adminhtml\Edit\InvalidateTokenButton\getInvalidateTokenUrl
getInvalidateTokenUrl()
Definition:
InvalidateTokenButton.php:38
$data
$data
Definition:
attribute_set_with_image_attribute.php:16
$customerId
$customerId
Definition:
quote_with_customer.php:16
Magento\Customer\Block\Adminhtml\Edit\GenericButton
Definition:
GenericButton.php:14
Magento\Customer\Block\Adminhtml\Edit\InvalidateTokenButton\getButtonData
getButtonData()
Definition:
InvalidateTokenButton.php:19