//load params
$component = JComponentHelper::getComponent("com_extension");
//data array for bind, check and save
$params = array(
'params' => $component->params->toArray(),
'id' => $component->id
);
$table = JTable::getInstance('extension');
// Load the previous Data
if (!$table->load($params['id'])) {
$this->setError($table->getError());
return false;
}
unset($params['id']);
// Bind the data.
if (!$table->bind($params)) {
$this->setError($table->getError());
return false;
}
// Check the data.
if (!$table->check()) {
$this->setError($table->getError());
return false;
}
// Store the data.
if (!$table->store()) {
$this->setError($table->getError());
return false;
}