JForm/ construct: Difference between revisions
From Joomla! Documentation
m clean up |
m preparing for archive only |
||
| Line 42: | Line 42: | ||
===Examples=== | ===Examples=== | ||
=== Code Examples === | |||
<dpl> | <dpl> | ||
noresultsheader=\n | noresultsheader=\n | ||
category=__construct | category=__construct | ||
category=JForm | category=JForm | ||
namespace=CodeExample | |||
category=MethodExample | category=MethodExample | ||
include=* | include=* | ||
Latest revision as of 01:41, 25 March 2017
Description
Method to construct the object on instantiation.
<! removed transcluded page call, red link never existed >
Syntax
__construct($options=array())
| Parameter Name | Default Value | Description |
|---|---|---|
| $options | array() | $options An array of form options. |
Returns
void
Defined in
libraries/joomla/form/form.php
Importing
jimport( 'joomla.form.form' );
Source Body
public function __construct($options = array())
{
// Set the options if specified.
$this->_options['array'] = array_key_exists('array', $options) ? $options['array'] : false;
$this->_options['prefix'] = array_key_exists('prefix', $options) ? $options['prefix'] : '%__';
}
<! removed transcluded page call, red link never existed >
Examples
Code Examples