first commit

This commit is contained in:
2025-08-02 16:30:27 +02:00
commit 23646bfcee
14851 changed files with 1750626 additions and 0 deletions

View File

@@ -0,0 +1,24 @@
<?php
namespace KupShop\CatalogBundle\View\Wrapper;
use KupShop\KupShopBundle\Template\ObjectWrapper;
class FilterParamsWrapper extends ObjectWrapper
{
/** @var \FilterParams */
protected $object;
protected static $objectType = \FilterParams::class;
public function isSelectedSectionByLevel(
?int $ancestorID = null,
int $level,
?int $sectionIDToCheck = null,
) {
$sectionsByLevel = $this->object->getSectionsByLevel();
$sections = isset($sectionsByLevel[$ancestorID][$level]) ? $sectionsByLevel[$ancestorID][$level] : [];
return is_null($sectionIDToCheck) && count($sections) == 0 || in_array($sectionIDToCheck, $sections);
}
}