JApplication/initialise: Difference between revisions
From Joomla! Documentation
No edit summary |
m removing red link to edit, no existant pages |
||
| Line 3: | Line 3: | ||
<span class="editsection" style="font-size:76%;"> | <span class="editsection" style="font-size:76%;"> | ||
<nowiki>[< | <nowiki>[<! removed edit link to red link >]</nowiki> | ||
</span> | </span> | ||
<! removed transcluded page call, red link never existed > | |||
===Syntax=== | ===Syntax=== | ||
| Line 50: | Line 50: | ||
<span class="editsection" style="font-size:76%;"> | <span class="editsection" style="font-size:76%;"> | ||
<nowiki>[< | <nowiki>[<! removed edit link to red link >]</nowiki> | ||
</span> | </span> | ||
<! removed transcluded page call, red link never existed > | |||
===Examples=== | ===Examples=== | ||
| Line 65: | Line 65: | ||
format= ,,, | format= ,,, | ||
</dpl> | </dpl> | ||
[[Category:Archived pages API15]] | |||
Revision as of 13:33, 12 May 2013
Description
Initialise the application.
[<! removed edit link to red link >]
<! removed transcluded page call, red link never existed >
Syntax
initialise($options=array())
| Parameter Name | Default Value | Description |
|---|---|---|
| $options | array() | An optional associative array of configuration settings. public |
Defined in
libraries/joomla/application/application.php
Importing
jimport( 'joomla.application.application' );
Source Body
function initialise($options = array())
{
jimport('joomla.plugin.helper');
//Set the language in the class
$config =& JFactory::getConfig();
// Check that we were given a language in the array (since by default may be blank)
if(isset($options['language'])) {
$config->setValue('config.language', $options['language']);
}
// Set user specific editor
$user =& JFactory::getUser();
$editor = $user->getParam('editor', $this->getCfg('editor'));
$editor = JPluginHelper::isEnabled('editors', $editor) ? $editor : $this->getCfg('editor');
$config->setValue('config.editor', $editor);
}
[<! removed edit link to red link >] <! removed transcluded page call, red link never existed >
Examples
<CodeExamplesForm />