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
Setup
Patch
Data
AddCustomerUpdatedAtAttribute.php
Go to the documentation of this file.
1
<?php
7
namespace
Magento\Customer\Setup\Patch\Data
;
8
9
use
Magento\Customer\Model\Customer
;
10
use Magento\Customer\Setup\CustomerSetupFactory;
11
use
Magento\Framework\App\ResourceConnection
;
12
use
Magento\Framework\Setup\ModuleDataSetupInterface
;
13
use
Magento\Framework\Setup\Patch\DataPatchInterface
;
14
use
Magento\Framework\Setup\Patch\PatchVersionInterface
;
15
20
class
AddCustomerUpdatedAtAttribute
implements
DataPatchInterface
,
PatchVersionInterface
21
{
25
private
$moduleDataSetup;
26
30
private
$customerSetupFactory;
31
37
public
function
__construct
(
38
ModuleDataSetupInterface
$moduleDataSetup,
39
CustomerSetupFactory $customerSetupFactory
40
) {
41
$this->moduleDataSetup = $moduleDataSetup;
42
$this->customerSetupFactory = $customerSetupFactory;
43
}
44
48
public
function
apply
()
49
{
50
$customerSetup = $this->customerSetupFactory->create([
'setup'
=> $this->moduleDataSetup]);
51
$customerSetup->addAttribute(
52
Customer::ENTITY
,
53
'updated_at'
,
54
[
55
'type'
=>
'static'
,
56
'label'
=>
'Updated At'
,
57
'input'
=>
'date'
,
58
'required'
=>
false
,
59
'sort_order'
=> 87,
60
'visible'
=>
false
,
61
'system'
=>
false
,
62
]
63
);
64
}
65
69
public
static
function
getDependencies
()
70
{
71
return
[
72
UpdateIdentifierCustomerAttributesVisibility::class,
73
];
74
}
75
79
public
static
function
getVersion
()
80
{
81
return
'2.0.4'
;
82
}
83
87
public
function
getAliases
()
88
{
89
return
[];
90
}
91
}
Magento\Framework\Setup\Patch\DataPatchInterface
Definition:
DataPatchInterface.php:12
Magento\Framework\Setup\ModuleDataSetupInterface
Definition:
ModuleDataSetupInterface.php:14
Magento\Customer\Setup\Patch\Data
Definition:
AddCustomerUpdatedAtAttribute.php:7
Magento\Customer\Setup\Patch\Data\AddCustomerUpdatedAtAttribute\getDependencies
static getDependencies()
Definition:
AddCustomerUpdatedAtAttribute.php:69
Magento\Customer\Setup\Patch\Data\AddCustomerUpdatedAtAttribute\__construct
__construct(ModuleDataSetupInterface $moduleDataSetup, CustomerSetupFactory $customerSetupFactory)
Definition:
AddCustomerUpdatedAtAttribute.php:37
Magento\Customer\Model\Customer\ENTITY
const ENTITY
Definition:
Customer.php:79
Magento\Customer\Model\Customer
Magento\Framework\Setup\Patch\PatchVersionInterface
Definition:
PatchVersionInterface.php:13
Magento\Customer\Setup\Patch\Data\AddCustomerUpdatedAtAttribute\getAliases
getAliases()
Definition:
AddCustomerUpdatedAtAttribute.php:87
Magento\Customer\Setup\Patch\Data\AddCustomerUpdatedAtAttribute\getVersion
static getVersion()
Definition:
AddCustomerUpdatedAtAttribute.php:79
Magento\Customer\Setup\Patch\Data\AddCustomerUpdatedAtAttribute\apply
apply()
Definition:
AddCustomerUpdatedAtAttribute.php:48
Magento\Framework\App\ResourceConnection
Magento\Customer\Setup\Patch\Data\AddCustomerUpdatedAtAttribute
Definition:
AddCustomerUpdatedAtAttribute.php:20