Magento 2 Documentation  2.3
Documentation for Magento 2 CMS v2.3 (December 2018)
CombinedFilterGroup.php
Go to the documentation of this file.
1 <?php
6 declare(strict_types=1);
7 
8 namespace Magento\Framework\Api;
9 
12 
17 {
21  const FILTERS = 'filters';
22  const COMBINATION_MODE = 'combination_mode';
23 
27  const COMBINED_WITH_AND = 'AND';
28  const COMBINED_WITH_OR = 'OR';
29 
35  public function getFilters()
36  {
37  $filters = $this->_get(self::FILTERS);
38  return $filters === null ? [] : $filters;
39  }
40 
48  public function setFilters(array $filters = null): self
49  {
50  return $this->setData(self::FILTERS, $filters);
51  }
52 
56  public function getCombinationMode()
57  {
58  return $this->_get(self::COMBINATION_MODE);
59  }
60 
66  public function setCombinationMode(string $mode): self
67  {
68  if ($mode !== self::COMBINED_WITH_AND && $mode !== self::COMBINED_WITH_OR) {
69  throw new InputException(
70  new Phrase('Invalid combination mode: %1', [$mode])
71  );
72  }
73 
74  return $this->setData(self::COMBINATION_MODE, $mode);
75  }
76 }
if($exist=($block->getProductCollection() && $block->getProductCollection() ->getSize())) $mode
Definition: grid.phtml:15
$filters
Definition: uploader.phtml:11