Skip to content

Get model class from entity #59

@SebLours

Description

@SebLours

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

Metadata

Metadata

Assignees

No one assigned

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions