Magento 2 Documentation  2.3
Documentation for Magento 2 CMS v2.3 (December 2018)
AvailabilityFlag.php
Go to the documentation of this file.
1 <?php
9 
11 
13 {
21  public function isEnabled($layer, array $filters = [])
22  {
23  return $this->canShowOptions($filters) || count($layer->getState()->getFilters());
24  }
25 
30  protected function canShowOptions($filters)
31  {
32  foreach ($filters as $filter) {
33  if ($filter->getItemsCount()) {
34  return true;
35  }
36  }
37 
38  return false;
39  }
40 }
$filters
Definition: uploader.phtml:11