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)
Main Page
Related Pages
+
Namespaces
Namespace List
+
Namespace Members
+
All
$
_
c
d
e
f
g
h
i
m
p
r
s
t
u
+
Functions
_
c
d
e
f
g
h
i
m
p
r
s
t
u
Variables
+
Data Structures
Data Structures
Data Structure Index
Class Hierarchy
+
Data Fields
+
All
$
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
+
Functions
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
+
Variables
$
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
+
Files
File List
+
Globals
+
All
$
(
_
a
b
c
d
e
f
g
h
i
j
m
n
o
p
q
r
s
t
u
v
w
+
Functions
_
c
d
e
f
g
m
o
r
s
t
v
+
Variables
$
(
_
a
b
c
d
e
f
g
h
i
j
m
n
o
p
q
r
s
t
u
v
w
Examples
•
All
Data Structures
Namespaces
Files
Functions
Variables
Pages
vendor
magento
module-paypal
Controller
Adminhtml
Billing
Agreement
Delete.php
Go to the documentation of this file.
1
<?php
7
namespace
Magento\Paypal\Controller\Adminhtml\Billing\Agreement
;
8
9
class
Delete
extends
\Magento\Paypal\Controller\Adminhtml\Billing\Agreement
10
{
16
const
ADMIN_RESOURCE
=
'Magento_Paypal::actions_manage'
;
17
23
public
function
execute
()
24
{
25
$agreementModel = $this->
_initBillingAgreement
();
26
27
if
($agreementModel) {
28
try
{
29
$agreementModel->delete();
30
$this->messageManager->addSuccessMessage(
31
__
(
'You deleted the billing agreement.'
)
32
);
33
$this->
_redirect
(
'paypal/*/'
);
34
return
;
35
}
catch
(\
Magento
\Framework\
Exception
\
LocalizedException
$e) {
36
$this->messageManager->addExceptionMessage(
37
$e,
38
$e->getMessage()
39
);
40
}
catch
(\
Exception
$e) {
41
$this->messageManager->addExceptionMessage(
42
$e,
43
__
(
'We can\'t delete the billing agreement.'
)
44
);
45
}
46
$this->
_redirect
(
'paypal/*/view'
, [
'_current'
=>
true
]);
47
}
48
$this->
_redirect
(
'paypal/*/'
);
49
}
50
}
Magento\Framework\Exception\LocalizedException
Definition:
LocalizedException.php:17
Magento\Backend\App\AbstractAction\_redirect
_redirect($path, $arguments=[])
Definition:
AbstractAction.php:316
Magento\Paypal\Controller\Adminhtml\Billing\Agreement
Definition:
Agreement.php:11
__
__()
Definition:
__.php:13
Magento\Catalog\Model\Product\Exception
Definition:
Exception.php:14
Magento\Paypal\Controller\Adminhtml\Billing\Agreement\Delete\ADMIN_RESOURCE
const ADMIN_RESOURCE
Definition:
Delete.php:16
Magento\Paypal\Controller\Adminhtml\Billing\Agreement\Delete\execute
execute()
Definition:
Delete.php:23
Magento\Paypal\Controller\Adminhtml\Billing\Agreement\Delete
Definition:
Delete.php:9
Magento
Magento\Paypal\Controller\Adminhtml\Billing\Agreement
Definition:
CancelTest.php:6
Magento\Paypal\Controller\Adminhtml\Billing\Agreement\_initBillingAgreement
_initBillingAgreement()
Definition:
Agreement.php:42