How can I create a constructor in a Yii2 controller? I am trying to find out what exactly is the $id $module and $config = [] in the parent::__construct arguments.
public function __construct($id, $module, $config = [])
{
$this->id = $id;
$this->module = $module;
parent::__construct($config);
}
I would appreciate a working example.
init()function.__construct.