Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Dispatch an event to define metadata inside the FigureBuilder #3019

Merged
merged 7 commits into from
May 26, 2021

Conversation

m-vo
Copy link
Member

@m-vo m-vo commented May 20, 2021

Q A
Fixed issues -
Docs PR or issue todo

This introduces a DefineMetadataEvent that gets dispatched inside the FigureBuilder as soon as metadata is requested. It is run after the FigureBuilder logic and allows to remove/replace/add Metadata.

@Toflar Toflar added the feature label May 20, 2021
@Toflar Toflar added this to the 4.12 milestone May 20, 2021
Toflar
Toflar previously approved these changes May 20, 2021
Co-authored-by: Martin Auswöger <martin@auswoeger.com>
@m-vo m-vo force-pushed the feature/figure-builder-metadata-event branch from e1bef69 to d24fdb7 Compare May 21, 2021 12:39
ausi
ausi previously approved these changes May 21, 2021
Toflar
Toflar previously approved these changes May 21, 2021
@leofeyer
Copy link
Member

I would prefer FigureMetadataEvent or FigureBuilderMetadataEvent instead of DefineMetadataEvent, because the latter does not really say what kind of metadata it handles (there could be page metadata, news metadata, file metadata etc.). Or is this a general event that we can use for any metadata? Then I would just call it MetadataEvent.

@Toflar
Copy link
Member

Toflar commented May 21, 2021

It is FileMetadataEvent, I guess. The class name is Contao\CoreBundle\File\Metadata :) (it represents meta data of tl_files).

@m-vo
Copy link
Member Author

m-vo commented May 21, 2021

We could also put the event in the File namespace. But that's not consistent with the other ones.

I have no strong preferences but would try to avoid having the FigureBuilder in the name.

@leofeyer
Copy link
Member

Then let's go with FileMetadataEvent but keep the class in the Event namespace.

@m-vo m-vo dismissed stale reviews from Toflar and ausi via 1ea7904 May 22, 2021 10:40
@m-vo
Copy link
Member Author

m-vo commented May 22, 2021

Now renamed to FileMetadataEvent in 4babc1e. I also added a small test for the event class in 1ea7904.

ausi
ausi previously approved these changes May 22, 2021
Toflar
Toflar previously approved these changes May 25, 2021
@leofeyer leofeyer force-pushed the feature/figure-builder-metadata-event branch from e1a8c0e to cee78dc Compare May 25, 2021 16:22
@leofeyer leofeyer merged commit ad86686 into contao:4.x May 26, 2021
@leofeyer
Copy link
Member

Thank you @m-vo.

@m-vo m-vo deleted the feature/figure-builder-metadata-event branch July 5, 2024 12:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants