View development details
When working with a view you can access variables that are sent to the view from the route handler, or from the frontmatter. You will also have helper functions available. You can view all these by calling the following function.
// Show incoming variables and view helper functions echo showEnvironment(get_defined_vars(), get_defined_functions());
The output will look something like this and may be useful for debugging and development.
VIEW DEVELOPMENT INFORMATION ---------------------------- Variables available: (var_dump each for more information): * app (NULL) * data (array) * di (object) * file (string): "/home/mos/htdocs/anax.webbprogrammering.se/vendor/anax/view/view/anax/v2/dev/view.php" * mount (string): "dev/" View helper functions available: (see /home/mos/htdocs/anax.webbprogrammering.se/vendor/anax/view/src/View/ViewHelperFunctions.php) * anax\view\asset, * anax\view\classlist, * anax\view\currentroute, * anax\view\currenturl, * anax\view\e, * anax\view\getcontentforroute, * anax\view\getpublisheddate, * anax\view\redirect, * anax\view\regionhascontent, * anax\view\renderregion, * anax\view\renderview, * anax\view\showenvironment, * anax\view\url, * anax\view\urlcontroller, * anax\view\wrapelementcontentwithstartend, * anax\view\wrapelementwithstartend