| 1 |
<?php |
| 2 |
/** |
| 3 |
* |
| 4 |
*/ |
| 5 |
|
| 6 |
/** |
| 7 |
* |
| 8 |
*/ |
| 9 |
class CJT_Models_Block_Parameters_Form_Groups |
| 10 |
extends ArrayObject { |
| 11 |
|
| 12 |
/** |
| 13 |
* put your comment there... |
| 14 |
* |
| 15 |
* @var mixed |
| 16 |
*/ |
| 17 |
protected $formId; |
| 18 |
|
| 19 |
/** |
| 20 |
* put your comment there... |
| 21 |
* |
| 22 |
* @param mixed $formId |
| 23 |
* @return CJT_Models_Block_Parameters_Form_Groups |
| 24 |
*/ |
| 25 |
public function __construct($formId) { |
| 26 |
// Initialize. |
| 27 |
$this->formId = $formId; |
| 28 |
$dbDriver = cssJSToolbox::getInstance()->getDBDriver(); |
| 29 |
// Query groups. |
| 30 |
$groups = $dbDriver->select("SELECT * FROM #__cjtoolbox_form_groups g LEFT JOIN #__cjtoolbox_form_group_xfields xf ON g.id = xf.groupId WHERE g.formId = {$this->formId};", ARRAY_A); |
| 31 |
parent::__construct($groups); |
| 32 |
} |
| 33 |
|
| 34 |
/** |
| 35 |
* put your comment there... |
| 36 |
* |
| 37 |
*/ |
| 38 |
public function getFormId() { |
| 39 |
return $this->formId; |
| 40 |
} |
| 41 |
|
| 42 |
} // End class. |