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
Data
Form
Element
Link.php
Go to the documentation of this file.
1
<?php
12
namespace
Magento\Framework\Data\Form\Element
;
13
14
use
Magento\Framework\Escaper
;
15
16
class
Link
extends
AbstractElement
17
{
24
public
function
__construct
(
25
Factory
$factoryElement,
26
CollectionFactory
$factoryCollection,
27
Escaper
$escaper,
28
$data
= []
29
) {
30
parent::__construct($factoryElement, $factoryCollection, $escaper,
$data
);
31
$this->
setType
(
'link'
);
32
}
33
39
public
function
getElementHtml
()
40
{
41
$html = $this->
getBeforeElementHtml
() .
'<a id="'
. $this->
getHtmlId
() .
'" '
. $this->
serialize
(
42
$this->
getHtmlAttributes
()
43
) . $this->
_getUiId
() .
'>'
. $this->
getEscapedValue
() .
"</a>\n"
. $this->
getAfterElementHtml
();
44
return
$html;
45
}
46
52
public
function
getHtmlAttributes
()
53
{
54
return
[
55
'charset'
,
56
'coords'
,
57
'href'
,
58
'hreflang'
,
59
'rel'
,
60
'rev'
,
61
'name'
,
62
'shape'
,
63
'target'
,
64
'accesskey'
,
65
'class'
,
66
'dir'
,
67
'lang'
,
68
'style'
,
69
'tabindex'
,
70
'title'
,
71
'xml:lang'
,
72
'onblur'
,
73
'onclick'
,
74
'ondblclick'
,
75
'onfocus'
,
76
'onmousedown'
,
77
'onmousemove'
,
78
'onmouseout'
,
79
'onmouseover'
,
80
'onmouseup'
,
81
'onkeydown'
,
82
'onkeypress'
,
83
'onkeyup'
,
84
'data-role'
,
85
'data-action'
86
];
87
}
88
}
Magento\Framework\Data\Form\Element\CollectionFactory
Definition:
CollectionFactory.php:10
Magento\Framework\Data\Form\Element\AbstractElement\getBeforeElementHtml
getBeforeElementHtml()
Definition:
AbstractElement.php:383
Magento\Framework\Data\Form\Element\Link
Definition:
Link.php:16
Magento\Framework\Data\Form\Element\AbstractElement\_getUiId
_getUiId($suffix=null)
Definition:
AbstractElement.php:333
Magento\Framework\Data\Form\Element\Factory
Definition:
Factory.php:14
Magento\Framework\Escaper
Definition:
Escaper.php:15
$data
$data
Definition:
attribute_set_with_image_attribute.php:16
Magento\Framework\Data\Form\Element\AbstractElement\getEscapedValue
getEscapedValue($index=null)
Definition:
AbstractElement.php:297
Magento\Framework\Data\Form\Element\AbstractElement\getHtmlId
getHtmlId()
Definition:
AbstractElement.php:172
Magento\Framework\Data\Form\Element\AbstractElement\setType
setType($type)
Definition:
AbstractElement.php:197
Magento\Framework\Data\Form\Element\AbstractElement\serialize
serialize($attributes=[], $valueSeparator='=', $fieldSeparator=' ', $quote='"')
Definition:
AbstractElement.php:486
Magento\Framework\Data\Form\Element\Link\getElementHtml
getElementHtml()
Definition:
Link.php:39
Magento\Framework\Data\Form\Element
Definition:
AbstractElement.php:6
Magento\Framework\Data\Form\Element\AbstractElement\getAfterElementHtml
getAfterElementHtml()
Definition:
AbstractElement.php:393
Magento\Framework\Data\Form\Element\Link\getHtmlAttributes
getHtmlAttributes()
Definition:
Link.php:52
Magento\Framework\Data\Form\Element\Link\__construct
__construct(Factory $factoryElement, CollectionFactory $factoryCollection, Escaper $escaper, $data=[])
Definition:
Link.php:24
Magento\Framework\Data\Form\Element\AbstractElement
Definition:
AbstractElement.php:21