syntax of $PAGE variable

syntax of $PAGE variable

by Francis Vila -
Number of replies: 3

I've seen $PAGE->title, $PAGE->bodyid, $PAGE->layout_options...

Is there any place that lists the different options available of $PAGE? And a list of the different variables?

Average of ratings: Useful (1)
In reply to Francis Vila

Re: syntax of $PAGE variable

by Mark Johnson -
Picture of Core developers Picture of Particularly helpful Moodlers Picture of Peer reviewers Picture of Plugin developers

Hi Francis,

$PAGE is an instance of the page_requirements_manager class. It doesn't appear to be documented on the wiki yet, but if you take a look in /lib/outputrequirementslib.php you can read the inline documentation for the properties and methods that are available.


Hope that helps

Mark

In reply to Mark Johnson

Re: syntax of $PAGE variable

by Francis Vila -

Well, not really...

I found and opened outputrequirementslib.php, but I couldn't find bodyid in it, or the other values I know to exist, so I think there's little chance of my finding a list of all the possible values...

In reply to Mark Johnson

Re: syntax of $PAGE variable

by Tim Hunt -
Picture of Core developers Picture of Documentation writers Picture of Particularly helpful Moodlers Picture of Peer reviewers Picture of Plugin developers

Oops wrong file. You mean lib/pagelib.php

The PHP docs there are quite detailed. It would stupid to try to duplicate that information in the wiki. The wiki would just get out of date.

The PHPdocs should be automatically built into documentation at http://phpdocs.moodle.org/, but for some reason that has not happened since last August, which is a pain.