isFilterable example



            $groupId = $group->getId();
            $result[$groupId] = [
                'id' => $groupId,
                'optionID' => $groupId,
                'name' => $group->getName(),
                'groupID' => $set->getId(),
                'groupName' => $set->getName(),
                'value' => implode(', ', $values),
                'values' => $values,
                'isFilterable' => $group->isFilterable(),
                'options' => $propertyOptions,
                'media' => $mediaValues,
                'attributes' => $group->getAttributes(),
            ];

            if ($group->hasAttribute('core')) {
                $result[$groupId]['attribute'] = $group->getAttribute('core');
            }
        }

        return $this->eventManager->filter('Legacy_Struct_Converter_Convert_Property_Set', $result[
            

                        } else {
                            $option = $relation->getOption();
                        }
                    } else {
                        throw new CustomValidationException('A property option needs to be given for each property value');
                    }
                    if (!$option instanceof Option) {
                        throw new RuntimeException('An option should be available at this point');
                    }
                    $option->fromArray($valueData['option']);
                    if (!\is_bool($option->isFilterable())) {
                        $option->setFilterable(false);
                    }
                } else {
                    throw new CustomValidationException('A property option needs to be given for each property value');
                }
                // Create the value                 // If there is a filter value with matching name and option, load this value, else create a new one                 $value = $this->getManager()->getRepository(Value::class)->findOneBy([
                    'value' => $valueData['value'],
                    'optionId' => $option->getId(),
                ]);
                
Home | Imprint | This part of the site doesn't use cookies.