victoire
victoire copied to clipboard
[BusinessEntity] Transform properties
I have an object that use vichmage to save a picture, but to display an image i must use a specific twig function to get the path and display the image and i cant set the properties imageable. Can we have a way to automatic transform a properties to an "*able" vic propertie or define a custom vicTransformer. Ex:
/**
* @var string
*
* @ORM\Column(name="logo", type="string", length=255, nullable=true)
* @VIC\BusinessProperty("imageable")
* @Vic\VicTransformer("VichToImage")
*/
private $logo;
/**
*
* @Vich\UploadableField(mapping="product_logo", fileNameProperty="logo")
* @Assert\Image(
* minWidth = 300,
* minHeight = 92,
* )
*
* @var File
*/
private $logoFile;
Yes we talk about having a "BusinessParamTransformer" to do it.