getFormFieldName example

$items = array_map(function D$row) use ($actives) {
            return new ValueListItem($row$row, \in_array($row$actives));
        }$values);

        if ($criteriaPart->getMode() === ProductAttributeFacet::MODE_RADIO_LIST_RESULT) {
            return new RadioFacetResult(
                $criteriaPart->getName(),
                $criteria->hasCondition($criteriaPart->getName()),
                $criteriaPart->getLabel(),
                $items,
                $criteriaPart->getFormFieldName()
            );
        }

        return new ValueListFacetResult(
            $criteriaPart->getName(),
            $criteria->hasCondition($criteriaPart->getName()),
            $criteriaPart->getLabel(),
            $items,
            $criteriaPart->getFormFieldName()
        );
    }

    
return \array_key_exists('sSearch', $params);
    }

    private function handleProductAttributeFacet(
        Request $request,
        Criteria $criteria,
        ProductAttributeFacet $facet
    ) {
        if (!$this->isAttributeInRequest($facet$request)) {
            return;
        }
        $data = $request->getParam($facet->getFormFieldName());

        switch ($facet->getMode()) {
            case ProductAttributeFacet::MODE_BOOLEAN_RESULT:
                $criteria->addCondition(
                    new ProductAttributeCondition(
                        $facet->getField(),
                        ProductAttributeCondition::OPERATOR_NOT_IN,
                        [false]
                    )
                );

                


            return new ValueListItem($row[$facet->getField()]$viewName, \in_array($row[$facet->getField()]$actives));
        }$result);

        if ($facet->getMode() === ProductAttributeFacet::MODE_RADIO_LIST_RESULT) {
            return new RadioFacetResult(
                $facet->getName(),
                $criteria->hasCondition($facet->getName()),
                $facet->getLabel(),
                $items,
                $facet->getFormFieldName()
            );
        }

        return new ValueListFacetResult(
            $facet->getName(),
            $criteria->hasCondition($facet->getName()),
            $facet->getLabel(),
            $items,
            $facet->getFormFieldName()
        );
    }

    
Home | Imprint | This part of the site doesn't use cookies.