Moodle  2.2.1
http://www.collinsharper.com
theme_config Class Reference

Public Member Functions

 renderer_prefixes ()
 editor_css_url ($encoded=true)
 editor_css_files ()
 css_urls (moodle_page $page)
 css_files ()
 css_content ()
 javascript_url ($inhead)
 javascript_files ($type)
 javascript_content ($type)
 post_process ($css)
 pix_url ($imagename, $component)
 resolve_image_location ($image, $component)
 get_renderer (moodle_page $page, $component, $subtype=null, $target=null)
 layout_file ($pagelayout)
 pagelayout_options ($pagelayout)
 setup_blocks ($pagelayout, $blockmanager)
 get_all_block_regions ()
 get_theme_name ()

Static Public Member Functions

static load ($themename)
static diagnose ($themename)

Data Fields

const DEFAULT_THEME = 'standard'
 $parents
 $sheets = array()
 $parents_exclude_sheets = null
 $plugins_exclude_sheets = null
 $editor_sheets = array()
 $javascripts = array()
 $javascripts_footer = array()
 $parents_exclude_javascripts = null
 $layouts = array()
 $rendererfactory = 'standard_renderer_factory'
 $csspostprocess = null
 $rarrow = null
 $larrow = null
 $enablecourseajax = true
 $name
 $dir
 $setting = null
 $enable_dock = false
 $hidefromselector = false

Protected Member Functions

 css_files_get_contents ($file, array $keys)
 resolve_excludes ($variable, $default=null)
 layout_info_for_page ($pagelayout)
 get_region_name ($region, $theme)

Protected Attributes

 $rf = null
 $parent_configs = array()

Detailed Description

This class represents the configuration variables of a Moodle theme.

All the variables with access: public below (with a few exceptions that are marked) are the properties you can set in your theme's config.php file.

There are also some methods and protected variables that are part of the inner workings of Moodle's themes system. If you are just editing a theme's config.php file, you can just ignore those, and the following information for developers.

Normally, to create an instance of this class, you should use the theme_config::load() factory method to load a themes config.php file. However, normally you don't need to bother, because moodle_page (that is, $PAGE) will create one for you, accessible as $PAGE->theme.

Since:
Moodle 2.0

Definition at line 99 of file outputlib.php.


Member Function Documentation

Returns the content of the one huge CSS merged from all style sheets.

Returns:
string

Definition at line 737 of file outputlib.php.

Here is the call graph for this function:

Here is the caller graph for this function:

css_files ( )

Returns an array of organised CSS files required for this output

Returns:
array

Definition at line 669 of file outputlib.php.

Here is the call graph for this function:

Here is the caller graph for this function:

css_files_get_contents ( file,
array keys 
) [protected]

Given an array of file paths or a single file path loads the contents of the CSS file, processes it then returns it in the same structure it was given.

Can be used recursively on the results of {

See also:
css_files}
Parameters:
array | string$fileAn array of file paths or a single file path
array$keysAn array of previous array keys [recursive addition]
Returns:
The converted array or the contents of the single file ($file type)

Definition at line 753 of file outputlib.php.

Here is the caller graph for this function:

css_urls ( moodle_page page)

Get the stylesheet URL of this theme

Parameters:
bool$encodedfalse means use & and true use & in URLs
Returns:
array of moodle_url

Definition at line 593 of file outputlib.php.

Here is the call graph for this function:

static diagnose ( themename) [static]

Theme diagnostic code. It is very problematic to send debug output to the actual CSS file, instead this functions is supposed to diagnose given theme and highlights all potential problems. This information should be available from the theme selection page or some other debug page for theme designers.

Parameters:
string$themename
Returns:
array description of problems

Definition at line 378 of file outputlib.php.

Returns the content of the CSS to be used in editor content

Returns:
string

Definition at line 550 of file outputlib.php.

Here is the call graph for this function:

Here is the caller graph for this function:

editor_css_url ( encoded = true)

Returns the stylesheet URL of this editor content

Parameters:
bool$encodedfalse means use & and true use & in URLs
Returns:
string

Definition at line 532 of file outputlib.php.

Here is the call graph for this function:

Get the list of all block regions known to this theme in all templates.

Returns:
array internal region name => human readable name.

Definition at line 1173 of file outputlib.php.

get_region_name ( region,
theme 
) [protected]

Definition at line 1149 of file outputlib.php.

get_renderer ( moodle_page page,
component,
subtype = null,
target = null 
)

Get the renderer for a part of Moodle for this theme.

Parameters:
moodle_page$pagethe page we are rendering
string$modulethe name of part of moodle. E.g. 'core', 'quiz', 'qtype_multichoice'.
string$subtypeoptional subtype such as 'news' resulting to 'mod_forum_news'
string$targetone of rendering target constants
Returns:
renderer_base the requested renderer.

Definition at line 1061 of file outputlib.php.

Returns the human readable name of the theme

Returns:
string

Definition at line 1188 of file outputlib.php.

javascript_content ( type)

Returns the content of the one huge javascript file merged from all theme javascript files.

Parameters:
bool$inhead
Returns:
string

Definition at line 856 of file outputlib.php.

javascript_files ( type)

Definition at line 781 of file outputlib.php.

Here is the call graph for this function:

javascript_url ( inhead)

Get the javascript URL of this theme

Parameters:
bool$inheadtrue means head url, false means footer
Returns:
moodle_url

Definition at line 771 of file outputlib.php.

Here is the call graph for this function:

layout_file ( pagelayout)

Given the settings of this theme, and the page pagelayout, return the full path of the page layout file to use.

Used by core_renderer::header().

Parameters:
string$pagelayoutthe the page layout name.
Returns:
string Full path to the lyout file to use

Definition at line 1093 of file outputlib.php.

Here is the call graph for this function:

layout_info_for_page ( pagelayout) [protected]

Get the information from $layouts for this type of page.

Parameters:
string$pagelayoutthe the page layout name.
Returns:
array the appropriate part of $layouts.

Definition at line 1075 of file outputlib.php.

Here is the call graph for this function:

static load ( themename) [static]

Load the config.php file for a particular theme, and return an instance of this class. (That is, this is a factory method.)

Parameters:
string$themenamethe name of the theme.
Returns:
theme_config an instance of this class.

Definition at line 345 of file outputlib.php.

Here is the call graph for this function:

Here is the caller graph for this function:

pagelayout_options ( pagelayout)

Returns auxiliary page layout options specified in layout configuration array.

Parameters:
string$pagelayout
Returns:
array

Definition at line 1126 of file outputlib.php.

pix_url ( imagename,
component 
)

Return the URL for an image

Parameters:
string$imagenamethe name of the icon.
string$component,specificationof one plugin like in get_string()
Returns:
moodle_url

Definition at line 901 of file outputlib.php.

Here is the call graph for this function:

post_process ( css)

Definition at line 865 of file outputlib.php.

Here is the caller graph for this function:

Returns output renderer prefixes, these are used when looking for the overridden renderers in themes.

Returns:
array

Definition at line 515 of file outputlib.php.

Here is the caller graph for this function:

resolve_excludes ( variable,
default = null 
) [protected]

Resolves an exclude setting to the theme's setting is applicable or the setting of its closest parent.

Parameters:
string$variableThe name of the setting the exclude setting to resolve
Returns:
mixed

Definition at line 833 of file outputlib.php.

Here is the caller graph for this function:

resolve_image_location ( image,
component 
)

Resolves the real image location.

Parameters:
string$imagename of image, may contain relative path
string$component
Returns:
string full file path

Definition at line 923 of file outputlib.php.

Here is the call graph for this function:

setup_blocks ( pagelayout,
blockmanager 
)

Inform a block_manager about the block regions this theme wants on this page layout.

Parameters:
string$pagelayoutthe general type of the page.
block_manager$blockmanagerthe block_manger to set up.
Returns:
void

Definition at line 1141 of file outputlib.php.


Field Documentation

$csspostprocess = null

Definition at line 256 of file outputlib.php.

$dir

Definition at line 302 of file outputlib.php.

Definition at line 148 of file outputlib.php.

$enable_dock = false

Definition at line 316 of file outputlib.php.

$enablecourseajax = true

Definition at line 286 of file outputlib.php.

$hidefromselector = false

Definition at line 323 of file outputlib.php.

Definition at line 156 of file outputlib.php.

Definition at line 164 of file outputlib.php.

$larrow = null

Definition at line 280 of file outputlib.php.

$layouts = array()

Definition at line 225 of file outputlib.php.

$name

Definition at line 295 of file outputlib.php.

$parent_configs = array() [protected]

Definition at line 336 of file outputlib.php.

Definition at line 115 of file outputlib.php.

$parents_exclude_javascripts = null

Definition at line 173 of file outputlib.php.

Definition at line 132 of file outputlib.php.

$plugins_exclude_sheets = null

Definition at line 140 of file outputlib.php.

$rarrow = null

Definition at line 268 of file outputlib.php.

Definition at line 245 of file outputlib.php.

$rf = null [protected]

Definition at line 330 of file outputlib.php.

$setting = null

Definition at line 309 of file outputlib.php.

$sheets = array()

Definition at line 123 of file outputlib.php.

const DEFAULT_THEME = 'standard'

Definition at line 103 of file outputlib.php.


The documentation for this class was generated from the following file:
 All Data Structures Namespaces Files Functions Variables Enumerations