fenepedia / contao-er24-rechtstexte

Contao Erweiterung für die Integration von Rechtstexten über die eRecht24 API
GNU General Public License v3.0
2 stars 2 forks source link

Hook Needed #11

Closed M-Zoldak closed 1 year ago

M-Zoldak commented 2 years ago

In our company we want to save the last update time of the texts from e-recht. So we need a hook, maybe in the PushController, with the information which type of text (data protection, imprint...) is updated. Can you add a hook please?

fenepedia commented 2 years ago

I will discuss this with @fritzmg

fritzmg commented 2 years ago

@Matheoz-sys do you need the time when the text was last updated on eRecht24? If so then you would need to research whether this information is available via their API. A hook within the content element would not help here.

If you need the time when the text was last cached in the Contao instance (which will be different from the time the text was last updated on eRecht24) - then I don't think there is a reliable way to find that out. At least I don't see any way to get that information from the cache item (via symfony/cache).

We could introduce another database field that stores the last update time.

But I do wonder what you need this info for?

etlam commented 2 years ago

@fritzmg The time the text was last updated is available via API, the field is called modified:
example: 2019-03-12 12:34:00

fritzmg commented 2 years ago

Then you can access that in your own code and thus no adjustment is necessary in this extension.

fenepedia commented 1 year ago

@Matheoz-sys Were you able to fetch the corresponding data now or is help still needed here?

M-Zoldak commented 1 year ago

Yes, i headed your advice, and SDK suits our goals perfectly. Thanks.