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
Grid
Renderer
Multiaction.php
Go to the documentation of this file.
1
<?php
6
namespace
Magento\Customer\Block\Adminhtml\Grid\Renderer
;
7
13
class
Multiaction
extends
\Magento\Backend\Block\Widget\Grid\Column\Renderer\Action
14
{
21
public
function
render
(\
Magento
\Framework\DataObject
$row
)
22
{
23
$html =
''
;
24
$actions = $this->
getColumn
()->getActions();
25
if
(!empty($actions) && is_array($actions)) {
26
$links
= [];
27
foreach
($actions as $action) {
28
if
(is_array($action)) {
29
$link
= $this->
_toLinkHtml
($action,
$row
);
30
if
(
$link
) {
31
$links
[] =
$link
;
32
}
33
}
34
}
35
$html = implode(
'<br />'
,
$links
);
36
}
37
38
if
($html ==
''
) {
39
$html =
' '
;
40
}
41
42
return
$html;
43
}
44
52
protected
function
_toLinkHtml
($action, \
Magento
\Framework\DataObject
$row
)
53
{
54
$product
=
$row
->getProduct();
55
56
if
(isset($action[
'process'
]) && $action[
'process'
] ==
'configurable'
) {
57
if
(
$product
->canConfigure()) {
58
$style =
''
;
59
$onClick = sprintf(
'onclick="return %s.configureItem(%s)"'
, $action[
'control_object'
],
$row
->getId());
60
return
sprintf(
'<a href="%s" %s %s>%s</a>'
, $action[
'url'
], $style, $onClick, $action[
'caption'
]);
61
}
else
{
62
return
false
;
63
}
64
}
else
{
65
return
parent::_toLinkHtml($action,
$row
);
66
}
67
}
68
}
Magento\Backend\Block\Widget\Grid\Column\Renderer\AbstractRenderer\getColumn
getColumn()
Definition:
AbstractRenderer.php:43
$link
$link
Definition:
quote_with_downloadable_product.php:27
Magento\Customer\Block\Adminhtml\Grid\Renderer\Multiaction\render
render(\Magento\Framework\DataObject $row)
Definition:
Multiaction.php:21
$links
$links
Definition:
downloadable_product_with_files_and_sample_url.php:39
Magento\Customer\Block\Adminhtml\Grid\Renderer
Definition:
Multiaction.php:6
Magento\Customer\Block\Adminhtml\Grid\Renderer\Multiaction
Definition:
Multiaction.php:13
Magento\Customer\Block\Adminhtml\Grid\Renderer\Multiaction\_toLinkHtml
_toLinkHtml($action, \Magento\Framework\DataObject $row)
Definition:
Multiaction.php:52
Magento
$product
$product
Definition:
bundle_product_with_not_visible_children.php:22
$row
$row
Definition:
cart_rule_free_shipping.php:12