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-backend
Block
Widget
Grid
Column
Filter
Range.php
Go to the documentation of this file.
1
<?php
12
namespace
Magento\Backend\Block\Widget\Grid\Column\Filter
;
13
18
class
Range
extends
\Magento\Backend\Block\Widget\Grid\Column\Filter\AbstractFilter
19
{
23
public
function
getHtml
()
24
{
25
$html =
'<div class="range"><div class="range-line">'
.
26
'<input type="text" name="'
.
27
$this->
_getHtmlName
() .
28
'[from]" id="'
.
29
$this->
_getHtmlId
() .
30
'_from" placeholder="'
.
31
__
(
32
'From'
33
) .
'" value="'
. $this->
getEscapedValue
(
34
'from'
35
) .
'" class="input-text admin__control-text no-changes" '
. $this->
getUiId
(
36
'filter'
,
37
$this->
_getHtmlName
(),
38
'from'
39
) .
'/></div>'
;
40
$html .=
'<div class="range-line">'
.
41
'<input type="text" name="'
.
42
$this->
_getHtmlName
() .
43
'[to]" id="'
.
44
$this->
_getHtmlId
() .
45
'_to" placeholder="'
.
46
__
(
47
'To'
48
) .
'" value="'
. $this->
getEscapedValue
(
49
'to'
50
) .
'" class="input-text admin__control-text no-changes" '
. $this->
getUiId
(
51
'filter'
,
52
$this->
_getHtmlName
(),
53
'to'
54
) .
'/></div></div>'
;
55
return
$html;
56
}
57
62
public
function
getValue
(
$index
=
null
)
63
{
64
if
(
$index
) {
65
return
$this->
getData
(
'value'
,
$index
);
66
}
67
$value
= $this->
getData
(
'value'
);
68
if
(isset(
$value
[
'from'
]) && strlen(
$value
[
'from'
]) > 0 || isset(
$value
[
'to'
]) && strlen(
$value
[
'to'
]) > 0) {
69
return
$value
;
70
}
71
return
null
;
72
}
73
77
public
function
getCondition
()
78
{
79
$value
= $this->
getValue
();
80
return
$value
;
81
}
82
}
Magento\Backend\Block\Widget\Grid\Column\Filter\Range\getValue
getValue($index=null)
Definition:
Range.php:62
Magento\Backend\Block\Widget\Grid\Column\Filter\AbstractFilter\_getHtmlName
_getHtmlName()
Definition:
AbstractFilter.php:72
Magento\Backend\Block\Widget\Grid\Column\Filter\Range\getCondition
getCondition()
Definition:
Range.php:77
Magento\Backend\Block\Widget\Grid\Column\Filter\AbstractFilter\_getHtmlId
_getHtmlId()
Definition:
AbstractFilter.php:82
Magento\Framework\DataObject\getData
getData($key='', $index=null)
Definition:
DataObject.php:119
Magento\Framework\View\Element\AbstractBlock\getUiId
getUiId($arg1=null, $arg2=null, $arg3=null, $arg4=null, $arg5=null)
Definition:
AbstractBlock.php:727
__
__()
Definition:
__.php:13
$value
$value
Definition:
gender.phtml:16
Magento\Backend\Block\Widget\Grid\Column\Filter
Definition:
AbstractFilter.php:7
Magento\Backend\Block\Widget\Grid\Column\Filter\AbstractFilter\getEscapedValue
getEscapedValue($index=null)
Definition:
AbstractFilter.php:93
Magento\Backend\Block\Widget\Grid\Column\Filter\Range\getHtml
getHtml()
Definition:
Range.php:23
$index
$index
Definition:
list.phtml:44
Magento\Backend\Block\Widget\Grid\Column\Filter\Range
Definition:
Range.php:18