General developer forum

syntax of $PAGE variable

 
This discussion has been locked because a year has elapsed since the last post. Please start a new discussion topic.
Francis Vila
syntax of $PAGE variable
 

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)
Picture of Mark Johnson
Re: syntax of $PAGE variable
Group Core developersGroup Particularly helpful MoodlersGroup 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

 
Average of ratings: -
Francis Vila
Re: syntax of $PAGE variable
 

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...

 
Average of ratings: -
Tim at Lone Pine Koala Sanctuary
Re: syntax of $PAGE variable
Group Core developersGroup Documentation writersGroup Particularly helpful MoodlersGroup 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.

 
Average of ratings: -