} 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(),
]);