Magento 2 Documentation  2.3
Documentation for Magento 2 CMS v2.3 (December 2018)
Public Member Functions | Data Fields
Filter Class Reference
Inheritance diagram for Filter:
AbstractSimpleObject

Public Member Functions

 getField ()
 
 setField ($field)
 
 getValue ()
 
 setValue ($value)
 
 getConditionType ()
 
 setConditionType ($conditionType)
 
- Public Member Functions inherited from AbstractSimpleObject
 __construct (array $data=[])
 
 setData ($key, $value)
 
 __toArray ()
 

Data Fields

const KEY_FIELD = 'field'
 
const KEY_VALUE = 'value'
 
const KEY_CONDITION_TYPE = 'condition_type'
 

Additional Inherited Members

- Protected Member Functions inherited from AbstractSimpleObject
 _get ($key)
 
- Protected Attributes inherited from AbstractSimpleObject
 $_data
 

Detailed Description

Filter which can be used by any methods from service layer.

@api @codeCoverageIgnore

Since
100.0.2

Definition at line 18 of file Filter.php.

Member Function Documentation

◆ getConditionType()

getConditionType ( )

Get condition type

Returns
string|null

Definition at line 74 of file Filter.php.

75  {
76  return $this->_get(self::KEY_CONDITION_TYPE) ?: 'eq';
77  }

◆ getField()

getField ( )

Get field

Returns
string

Definition at line 32 of file Filter.php.

33  {
34  return $this->_get(self::KEY_FIELD);
35  }

◆ getValue()

getValue ( )

Get value

Returns
string

Definition at line 53 of file Filter.php.

54  {
55  return $this->_get(self::KEY_VALUE);
56  }

◆ setConditionType()

setConditionType (   $conditionType)

Set condition type

Parameters
string$conditionType
Returns
$this

Definition at line 85 of file Filter.php.

86  {
87  return $this->setData(self::KEY_CONDITION_TYPE, $conditionType);
88  }

◆ setField()

setField (   $field)

Set field

Parameters
string$field
Returns
$this

Definition at line 43 of file Filter.php.

44  {
45  return $this->setData(self::KEY_FIELD, $field);
46  }

◆ setValue()

setValue (   $value)

Set value

Parameters
string$value
Returns
$this

Definition at line 64 of file Filter.php.

65  {
66  return $this->setData(self::KEY_VALUE, $value);
67  }
$value
Definition: gender.phtml:16

Field Documentation

◆ KEY_CONDITION_TYPE

const KEY_CONDITION_TYPE = 'condition_type'

Definition at line 25 of file Filter.php.

◆ KEY_FIELD

const KEY_FIELD = 'field'

#+ Constants for Data Object keys

Definition at line 23 of file Filter.php.

◆ KEY_VALUE

const KEY_VALUE = 'value'

Definition at line 24 of file Filter.php.


The documentation for this class was generated from the following file: