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
framework
View
TemplateEngine
Xhtml
Compiler
Directive
CallableMethod.php
Go to the documentation of this file.
1
<?php
6
namespace
Magento\Framework\View\TemplateEngine\Xhtml\Compiler\Directive
;
7
8
use
Magento\Framework\DataObject
;
9
13
class
CallableMethod
implements
DirectiveInterface
14
{
22
public
function
execute
($directive,
DataObject
$processedObject)
23
{
24
$object = $processedObject;
25
$result
=
''
;
26
foreach
(explode(
'.'
, $directive[1]) as
$method
) {
27
$methodName = substr(
$method
, 0, strpos(
$method
,
'('
));
28
if
(is_callable([$object, $methodName])) {
29
$result
= $object->$methodName();
30
if
(is_scalar(
$result
)) {
31
break
;
32
}
33
$object =
$result
;
34
continue
;
35
}
36
break
;
37
}
38
39
return
$result
;
40
}
41
47
public
function
getPattern
()
48
{
49
return
'#\{\{((?:[\w_0-9]+\(\)){1}(?:(?:\.[\w_0-9]+\(\))+)?)\}\}#'
;
50
}
51
}
$result
$result
Definition:
product_configurable_not_available_rollback.php:26
Magento\Framework\View\TemplateEngine\Xhtml\Compiler\Directive\DirectiveInterface
Definition:
DirectiveInterface.php:13
Magento\Framework\DataObject
Definition:
DataObject.php:15
Magento\Framework\View\TemplateEngine\Xhtml\Compiler\Directive
Definition:
CallableMethod.php:6
Magento\Framework\View\TemplateEngine\Xhtml\Compiler\Directive\CallableMethod\execute
execute($directive, DataObject $processedObject)
Definition:
CallableMethod.php:22
Magento\Framework\View\TemplateEngine\Xhtml\Compiler\Directive\CallableMethod
Definition:
CallableMethod.php:13
$method
$method
Definition:
info.phtml:13
Magento\Framework\View\TemplateEngine\Xhtml\Compiler\Directive\CallableMethod\getPattern
getPattern()
Definition:
CallableMethod.php:47
Magento\Framework\DataObject
Definition:
Cache.php:6