Open yozmag opened 9 years ago
Thanks for pointing this out. I think it is possible to do this, but I'll have to do some research. If you would like to collaborate on this, I encourage you to fork this repo and do some experimentation. I'm willing to consider a pull request. You are also free to contact me by email to work together on this outside of github. You can find my email address at the bottom of the Attachments help page.
-Jonathan
Hello I looking for a place to insert code that will generate a event. On the AttachmentsHelper class I looked at $attachment->store() and a find that is saving the object to the database. Looking at the Joomla docs and MVC framework, this shouldn't be the place. It is confusing to me because you also have a AttachmentsModelAttachment class with a save method which if fine, but i didn't find the place where it is invoked. Can you tell me how can an attachement be saved to the database. Thank you.
Yes, the $attachments->store() is where the attachment is stored (not the AttachmentsModelAttachment one). This may not be what Joomla docs/MVC framework recommend, but that is the way it is.
So in AttachmentsHelper after $attachment->store() is the place to insert your code to generate an event.
-Jonathan
Hi, maybe when updating this component o joomla 4 you can integrate with the finder, please look at https://www.joomlashack.com/blog/tutorials/joomla-4-search/ for more info.
I have write a attachment plugin for the finder component, but I think that events like "public function onFinderAfterSave($context) {" are not being throw when a attachment is saved. How can I contribute with my plugin and is the a chance that attachments component start throwing events?