Stud.IP
2.0 Revision 48548
|
Static Public Member Functions | |
static | initialize () |
static | setTitle ($title) |
static | getTitle () |
static | setHelpKeyword ($help_keyword) |
static | getHelpKeyword () |
static | setTabNavigation ($path) |
static | getTabNavigation () |
static | addStyle ($content) |
static | addStylesheet ($source, $attributes=array()) |
static | removeStylesheet ($source, $attributes=array()) |
static | addScript ($source) |
static | removeScript ($source) |
static | addHeadElement ($name, $attributes=array(), $content=NULL) |
static | removeHeadElement ($name, $attributes=array()) |
static | getHeadElements () |
static | addBodyElements ($html) |
static | getBodyElements () |
static | disableHeader () |
static | isHeaderEnabled () |
static | getBodyElementId () |
The PageLayout class provides utility functions to control the global page layout of Stud.IP. This includes the page title, the included CSS style sheets and JavaScript files. It replaces the "traditional" way of manipulating the page header via special global variables (like $CURRENT_PAGE and $_include_stylesheet).
Each Stud.IP page should at least set the page title and help keyword (if a help page exists).
|
static |
|
static |
Add an extra HTML element to the HTML HEAD section. This can be used to include RSS/ATOM feed links, META tags or other stuff. If $content is NULL, no closing tag is generated. If the element needs a closing tag (like SCRIPT) but should not have contents, pass the empty string as the third parameter.
string | $name | element name (e.g. 'meta') |
array | $attributes | additional attributes for the element |
string | $content | element contents, if any |
|
static |
Add a JavaScript SCRIPT element to the HTML HEAD section.
string | $source | URL of JS file or file in assets folder |
|
static |
Add a STYLE element to the HTML HEAD section.
string | $content | element contents |
|
static |
Add a style sheet LINK element to the HTML HEAD section.
string | $source | style sheet URL or file in assets folder |
array | $attributes | additional attributes for LINK element |
|
static |
Disable output of the navigation header for this page.
|
static |
Get a dynamically generated ID for the BODY element. The ID is based on the name of the PHP script, with the suffix removed and all non-alphanumeric characters replace with '_'.
|
static |
|
static |
|
static |
Get the current help keyword (defaults to 'Basis.Allgemeines').
|
static |
Returns the base navigation object (not its path) for the tabs. May return NULL if tab display is disabled.
|
static |
Get the current page title (defaults to $UNI_NAME_CLEAN).
|
static |
Initialize default page layout. This should only be called once from phplib_local.inc.php. Don't use this otherwise.
|
static |
Return whether output of the navigation header is enabled.
|
static |
Remove HTML elements from the HTML HEAD section. This method will remove all elements matching the given name and all the attributes.
For example, to remove all META elements: PageLayout::removeHeadElement('meta');
Remove all style sheet LINK elements: PageLayout::removeHeadElement('link', array('rel' => 'stylesheet'));
Remove a particular style sheet LINK by href: PageLayout::removeHeadElement('link', array('href' => '...'));
|
static |
Remove a JavaScript SCRIPT element from the HTML HEAD section.
string | $source | URL of JS file or file in assets folder |
|
static |
Remove a style sheet LINK element from the HTML HEAD section.
string | $source | style sheet URL or file in assets folder |
array | $attributes | additional attributes for LINK element |
|
static |
Set the help keyword to the given string.
|
static |
Select which tabs (if any) should be displayed on the page. The argument specifies a navigation item in the tree whose children will form the first level of tabs. If $path is NULL, no tabs are displayed. The default setting is to use the active element in the top navigation.
string | $path | path of navigation item for tabs or NULL |
|
static |
Set the page title to the given text.