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
framework
Setup
Option
TextConfigOption.php
Go to the documentation of this file.
1
<?php
6
namespace
Magento\Framework\Setup\Option
;
7
11
class
TextConfigOption
extends
AbstractConfigOption
12
{
16
const
FRONTEND_WIZARD_TEXT
=
'text'
;
17
const
FRONTEND_WIZARD_PASSWORD
=
'password'
;
18
const
FRONTEND_WIZARD_TEXTAREA
=
'textarea'
;
32
public
function
__construct
(
33
$name
,
34
$frontendType,
35
$configPath,
36
$description
=
''
,
37
$defaultValue =
null
,
38
$shortCut =
null
39
) {
40
if
($frontendType != self::FRONTEND_WIZARD_TEXT && $frontendType != self::FRONTEND_WIZARD_PASSWORD &&
41
$frontendType != self::FRONTEND_WIZARD_TEXTAREA
42
) {
43
throw
new \InvalidArgumentException(
"Frontend input type has to be 'text', 'textarea' or 'password'."
);
44
}
45
parent::__construct(
46
$name
,
47
$frontendType,
48
self::VALUE_REQUIRED,
49
$configPath,
50
$description
,
51
$defaultValue,
52
$shortCut
53
);
54
}
55
63
public
function
validate
(
$data
)
64
{
65
if
(!is_string(
$data
)) {
66
throw
new \InvalidArgumentException(
"'{$this->getName()}' must be a string"
);
67
}
68
parent::validate(
$data
);
69
}
70
}
$description
$description
Definition:
pre_composer_update_2.3.php:162
Magento\Framework\Setup\Option\TextConfigOption\FRONTEND_WIZARD_PASSWORD
const FRONTEND_WIZARD_PASSWORD
Definition:
TextConfigOption.php:17
Magento\Framework\Setup\Option\TextConfigOption\FRONTEND_WIZARD_TEXT
const FRONTEND_WIZARD_TEXT
Definition:
TextConfigOption.php:16
Magento\Framework\Setup\Option\TextConfigOption\__construct
__construct( $name, $frontendType, $configPath, $description='', $defaultValue=null, $shortCut=null)
Definition:
TextConfigOption.php:32
Magento\Framework\Setup\Option\TextConfigOption
Definition:
TextConfigOption.php:11
$data
$data
Definition:
attribute_set_with_image_attribute.php:16
Magento\Framework\Setup\Option\AbstractConfigOption
Definition:
AbstractConfigOption.php:13
Magento\Framework\Setup\Option\TextConfigOption\FRONTEND_WIZARD_TEXTAREA
const FRONTEND_WIZARD_TEXTAREA
Definition:
TextConfigOption.php:18
Magento\Framework\Setup\Option
Definition:
AbstractConfigOption.php:6
Magento\Framework\Setup\Option\TextConfigOption\validate
validate($data)
Definition:
TextConfigOption.php:63
$name
if(!isset($_GET['name'])) $name
Definition:
log.php:14