API17:JParameter::def
From Joomla! Documentation
(Difference between revisions)
(Bulk upload by Doxiki2) |
(Updated to r1448:247ba8d88526) |
||
| (One intermediate revision by one user not shown) | |||
| Line 8: | Line 8: | ||
<nowiki>[</nowiki>[[Description:JParameter::def|Edit Descripton]]<nowiki>]</nowiki> | <nowiki>[</nowiki>[[Description:JParameter::def|Edit Descripton]]<nowiki>]</nowiki> | ||
</span> | </span> | ||
| − | |||
| − | |||
| − | |||
<source lang="php"> | <source lang="php"> | ||
| − | public | + | public function def ( |
| + | $key | ||
| + | $default= '' | ||
| + | $group= '_default' | ||
| + | ) | ||
</source> | </source> | ||
{| class="wikitable" | {| class="wikitable" | ||
| Line 34: | Line 35: | ||
|string | |string | ||
|'_default' | |'_default' | ||
| − | |An optional group for the parameter. | + | |An optional group for the parameter. |
|- | |- | ||
|} | |} | ||
| − | + | * '''Returns''' string The value set, or the default if the value was not previously set (or null). | |
| − | string The value set, or the default if the value was not previously set (or null). | + | * '''Defined''' on line 98 of libraries/joomla/html/parameter.php |
| − | + | * '''Since''' {{JVer|11.1 }} | |
| − | libraries/joomla/html/parameter.php | + | |
| − | + | ||
===See also=== | ===See also=== | ||
| + | * {{JVer|11.1}} '''JParameter::def source code''' on [[jplatform:html/parameter.php#cl-90|BitBucket]] | ||
| + | * {{JVer|11.1}} Class [[JParameter/11.1|JParameter]] | ||
| + | * {{JVer|11.1}} Subpackage [[Subpackage_Html/11.1|Html]] | ||
| + | * [[JParameter::def|Other versions of JParameter::def]] | ||
| + | {{SeeAlso:JParameter::def}} | ||
<span class="editsection" style="font-size:76%;"> | <span class="editsection" style="font-size:76%;"> | ||
<nowiki>[</nowiki>[[SeeAlso:JParameter::def|Edit See Also]]<nowiki>]</nowiki> | <nowiki>[</nowiki>[[SeeAlso:JParameter::def|Edit See Also]]<nowiki>]</nowiki> | ||
</span> | </span> | ||
| − | + | ===User contributed notes=== | |
| − | + | ||
| − | + | ||
| − | === | + | |
<CodeExamplesForm /> | <CodeExamplesForm /> | ||
<dpl> | <dpl> | ||
| Line 57: | Line 58: | ||
category=MethodExample | category=MethodExample | ||
include=* | include=* | ||
| + | namespace=CodeExample | ||
format= ,,, | format= ,,, | ||
</dpl> | </dpl> | ||
<noinclude>[[Category:JParameter]][[Category:JParameter::def]]</noinclude> | <noinclude>[[Category:JParameter]][[Category:JParameter::def]]</noinclude> | ||
Revision as of 21:28, 27 April 2011
This Namespace has been archived - Please Do Not Edit or Create Pages in this namespace. Pages contain information for a Joomla! version which is no longer supported. It exists only as a historical reference, will not be improved and its content may be incomplete.
JParameter::def
Description
Sets a default value if not alreay assigned.
Description:JParameter::def [Edit Descripton]
public function def ( $key $default= '' $group= '_default' )
| Parameter | Type | Default | Description |
|---|---|---|---|
| $key | string | The name of the parameter. | |
| $default | string | An optional value for the parameter. | |
| $group | string | '_default' | An optional group for the parameter. |
- Returns string The value set, or the default if the value was not previously set (or null).
- Defined on line 98 of libraries/joomla/html/parameter.php
- Since
See also
-
JParameter::def source code on BitBucket
-
Class JParameter
-
Subpackage Html
- Other versions of JParameter::def
SeeAlso:JParameter::def [Edit See Also]
User contributed notes
<CodeExamplesForm />
