-
Notifications
You must be signed in to change notification settings - Fork 27
Open
Milestone
Description
I would like to get the model class from a flexible entity instance ...
Is there a simple way to do this ?
I need this for my custom UniqueFlexibleEntityValidator which validate that a database record doesn't exists for a field set (like a slug).
It is what the DoctrrineUniqueEntityValidator does (@see https://github.com/symfony/symfony/blob/master/src/Symfony/Bridge/Doctrine/Validator/Constraints/UniqueEntityValidator.php).
I need to access to the model class from the flexible entity instance in the validation process (to test uniqueness).
I can add a custom constant (MODEL_CLASS) in my flexible entity class but it is not optimized ...
Thanks