Hi Everyone,
I've written a function that produces an array to solve my problem from here: https://moodle.org/mod/forum/discuss.php?d=356256
I have an array similar to:
1 | image1.jpg |
---|---|
2 | image2.jpg |
3 | image3.jpg |
4 | image4.jpg |
in my core_renderer as a public function
and call this array in my layout files via:
$patharray = $OUTPUT->get_imagepaths();
Is passing an array generated from a function via public method a bad idea? if so, why?
I intend to then construct the path using the filename from the array in the layout page.
Thanks,
Andrew