API15:JRequest/getBool
From Joomla! Documentation
Description
Fetches and returns a given filtered variable. The bool filter will only return true/false bool values. This is currently only a proxy function for getVar().
Template:Description:JRequest/getBool
Syntax
getBool($name, $default=false, $hash= 'default')
| Parameter Name | Default Value | Description |
|---|---|---|
| $name | $name Variable name | |
| $default | false | $default Default value if the variable does not exist |
| $hash | 'default' | $hash Where the var should come from (POST, GET, FILES, COOKIE, METHOD) |
Returns
bool Requested variable
Defined in
libraries/joomla/environment/request.php
Importing
jimport( 'joomla.environment.request' );
Source Body
function getBool($name, $default = false, $hash = 'default')
{
return JRequest::getVar($name, $default, $hash, 'bool');
}
[Edit See Also] Template:SeeAlso:JRequest/getBool
Examples
<CodeExamplesForm />