Ordinarily if I wanted to include some common code on multiple pages I would use something like:
<?php include_once(__DIR__.'/../someFolder/SomeFile.php' ?>
Just wondering what the preferred way to do this is in Yii2? I have looked at Widgets and Partial views but haven't really been able to conclude this is the best way to factorise common code between pages. I can provide more info, just not sure what too.
Came across this: http://www.yiiframework.com/doc-2.0/guide-structure-views.html#rendering-in-widgets is it likely to be where I should be looking?