After having watched https://www.youtube.com/watch?v=BXVqORbN16Q and https://www.youtube.com/watch?v=34R7buoM_cc, By the way thanks for Andreas Schemp & Christian Schiffler.
I tried to create a service for my Hook callback inside with my custom module attached below, but I failed. Can some one tell me how do I do it correctly. This module is in working condition right now as I've registered the hook in traditional Contao3 way. It just adds a background image to article. I thank you for your suggestion.
Solved:
I needed to create a AppBundleExtension class, within that I can load my .yml files. Instantiate this class inside AppBundle class with getContainerExtension(). Attached working zip file 2.
Bookmarks