I have been playing around with Magento 2. There are some things which I don't understand yet. As far as I know so far is that the object manager automatically inserts the right objects to the constuctor. I have some questions regarding this.
I have a controller which extends the following class:
When I open this class I see that the
__constuctor class has one argument and it expects to be an instance of the
Now for learning purposes i did this to see with is being injected (it doesn't take more then two arguments by default).
public function __construct($a, $b)
It outputs the following
Why are these objects injected? Where can I see which objects I can pass in my constuctor. I couldn't findt any hints in the parent class. I suppose it is dependend on the class I extend?
What happens when I extends below class? And how does the system (and I) know what will be injected?
What I am looking for in an answer is not a solution or explaination for this specific example. Moreover I am looking for an overall explaination how I can understand the system better and where I can lookup what I should or must pass as an argument.