Elgg framework has a MVC architecture where View knows Model/entities.
To solve this, View needs to get the owner entity which has to display in your widget, so: in elgg/mod/(your widget folder)/views/default/widgets/(your name widget)/content.php, you should write the code of below:
Elgg framework has a MVC architecture where View knows Model/entities.
To solve this, View needs to get the owner entity which has to display in your widget, so: in elgg/mod/(your widget folder)/views/default/widgets/(your name widget)/content.php, you should write the code of below:
Hope it helps!