API15

JParameter/def

From Joomla! Documentation

< API15:JParameter
Revision as of 13:40, 12 May 2013 by JoomlaWikiBot (talk | contribs) (removing red link to edit, no existant pages)

The "API15" namespace is an archived namespace. This page contains information for a Joomla! version which is no longer supported. It exists only as a historical reference, it will not be improved and its content may be incomplete and/or contain broken links.

Description[edit]

Sets a default value if not alreay assigned

[<! removed edit link to red link >]

<! removed transcluded page call, red link never existed >

Syntax[edit]

def($key, $default= '', $group= '_default')
Parameter Name Default Value Description
$key The name of the param
$default The value of the parameter
$group '_default' The parameter group to modify

Returns[edit]

string The set value

Defined in[edit]

libraries/joomla/html/parameter.php

Importing[edit]

jimport( 'joomla.html.parameter' );

Source Body[edit]

function def($key, $default = '', $group = '_default') {
        $value = $this->get($key, (string) $default, $group);
        return $this->set($key, $value);
}

[<! removed edit link to red link >] <! removed transcluded page call, red link never existed >

Examples[edit]

<CodeExamplesForm />