API16

JParameter/def

< API16:JParameter

The "API16" 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

Sets a default value if not alreay assigned.



Syntax

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

string The set value.

Defined in

libraries/joomla/html/parameter.php

Importing

jimport( 'joomla.html.parameter' );

Source Body

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



Examples

Code Examples


Advertisement