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
magento2-base
dev
tests
integration
testsuite
Magento
Customer
_files
attribute_user_defined_customer.php
Go to the documentation of this file.
1
<?php
7
if
(!defined(
'FIXTURE_ATTRIBUTE_USER_DEFINED_CUSTOMER_NAME'
)) {
8
define(
'FIXTURE_ATTRIBUTE_USER_DEFINED_CUSTOMER_NAME'
,
'user_attribute'
);
9
define(
'FIXTURE_ATTRIBUTE_USER_DEFINED_CUSTOMER_FRONTEND_LABEL'
,
'frontend_label'
);
10
}
11
13
$model
=
\Magento\TestFramework\Helper\Bootstrap::getObjectManager
()->create(\
Magento
\Customer\Model\Attribute::class);
14
15
$model
->setName(
16
FIXTURE_ATTRIBUTE_USER_DEFINED_CUSTOMER_NAME
17
)->setEntityTypeId(
18
1
19
)->setIsUserDefined(
20
1
21
)->setAttributeSetId(
22
1
23
)->setAttributeGroupId(
24
1
25
)->setFrontendInput(
26
'text'
27
)->setFrontendLabel(
28
FIXTURE_ATTRIBUTE_USER_DEFINED_CUSTOMER_FRONTEND_LABEL
29
)->setSortOrder(
30
1221
31
);
32
33
$model
->save();
$model
$model
Definition:
attribute_user_defined_customer.php:13
Magento
Magento\TestFramework\Helper\Bootstrap\getObjectManager
static getObjectManager()
Definition:
Bootstrap.php:125