Symfony – Checking something without method execution

In my Symfony project I have and idea to check for my entity field "created". When the creation date of that date is more into the past than two weeks I want to update that entity with some data.

As this is new functionality for me, I was planing to write a function that with DateTime object that will check that.

Other thing I wanted to ask is, how to do it without firing that specific method? Can it be checked regularly on page load or something like that?

What is the right approach here?

Is it an Event Listener the right thing or am I missing something else?

Source: Symfony Questions

Was this helpful?

0 / 0

Leave a Reply 0

Your email address will not be published. Required fields are marked *