I have a project that i'm currently migrating from pdo/sql to doctrine, but that's not based in any framework (shame).
I need to add many filters to the products entity, so the rows matched by these filters will never output anywhere in the frontend. The filters are for example: products out of stock, products with empty names, no pictures, no description, column "disabled" set to 1, etc...
How could i create this filter? Is there any example?
I dont think it would be a good solution to use findOneBy and add a multiple-index array with all conditions i need in every page. Also sometimes i update these filters and its not cool to update it everywhere the product entity is used in the project.