Welcome, Guest
Username Password: Remember me

Saving extension paramaters
(1 viewing) (1) Guest
  • Page:
  • 1

TOPIC: Saving extension paramaters

Saving extension paramaters 1 year, 4 months ago #58

  • Harold Prins
  • OFFLINE
  • Administrator
  • Posts: 126
  • Karma: 5
		
//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;
}
Last Edit: 1 year, 4 months ago by Harold Prins.
  • Page:
  • 1
Time to create page: 0.80 seconds

Contact

Harold Prins
Canneveltstraat 5
8043 TE Zwolle
The Netherlands

+31(0)38 460 18 71
+31(0)6 38 56 49 31
This email address is being protected from spambots. You need JavaScript enabled to view it.

Donate

Please consider supporting our efforts.

Amount: 

Tweets

OSense O-Sense