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
Model
ActionValidator
RemoveAction.php
Go to the documentation of this file.
1
<?php
9
namespace
Magento\Framework\Model\ActionValidator
;
10
11
use
Magento\Framework\Model\AbstractModel
;
12
17
class
RemoveAction
18
{
22
protected
$registry
;
23
27
protected
$protectedModels
;
28
33
public
function
__construct
(\
Magento
\Framework\
Registry
$registry
, array
$protectedModels
= [])
34
{
35
$this->registry =
$registry
;
36
$this->protectedModels =
$protectedModels
;
37
}
38
45
public
function
isAllowed
(
AbstractModel
$model
)
46
{
47
$isAllowed
=
true
;
48
49
if
($this->registry->registry(
'isSecureArea'
)) {
50
$isAllowed
=
true
;
51
}
elseif
(in_array($this->
getBaseClassName
($model), $this->protectedModels)) {
52
$isAllowed
=
false
;
53
}
54
55
return
$isAllowed
;
56
}
57
63
protected
function
getBaseClassName
($object)
64
{
65
$className
= ltrim(get_class($object),
"\\"
);
66
$className
= str_replace([
'\Interceptor'
,
'\Proxy'
], [
''
],
$className
);
67
68
return
$className
;
69
}
70
}
Magento\Framework\Model\AbstractModel
Definition:
AbstractModel.php:19
elseif
elseif(isset( $params[ 'redirect_parent']))
Definition:
iframe.phtml:17
Magento\Framework\Model\ActionValidator\RemoveAction\$protectedModels
$protectedModels
Definition:
RemoveAction.php:27
$model
$model
Definition:
enable_catalog_product_reindex_schedule.php:9
Magento\Framework\Model\ActionValidator\RemoveAction
Definition:
RemoveAction.php:17
Magento\Framework\Model\ActionValidator\RemoveAction\getBaseClassName
getBaseClassName($object)
Definition:
RemoveAction.php:63
$isAllowed
$isAllowed
Definition:
get.php:20
Magento
Magento\Framework\Model\ActionValidator
Magento\Framework\Registry
Definition:
Registry.php:18
Magento\Framework\Model\ActionValidator\RemoveAction\__construct
__construct(\Magento\Framework\Registry $registry, array $protectedModels=[])
Definition:
RemoveAction.php:33
Magento\Framework\Model\ActionValidator\RemoveAction\isAllowed
isAllowed(AbstractModel $model)
Definition:
RemoveAction.php:45
$className
if($currentSelectedMethod==$_code) $className
Definition:
form.phtml:31
Magento\Framework\Model\ActionValidator\RemoveAction\$registry
$registry
Definition:
RemoveAction.php:22