public function SocialContent::saveForm in Social Content 7.2
Save the form values of a form that was request with the getForm method.
Parameters
array $values: The form values.
File
- ./
social_content.class.inc, line 142 - Social Content class.
Class
- SocialContent
- TODO: Table names should be a property for ease of change Separate this class into smaller classes.
Code
public function saveForm($values) {
$type = $values[$this
->getFormRootElementKey()]['type'];
$settings = $values[$this
->getFormRootElementKey()][$this
->getMachineName()];
if ($type == 'global') {
$this
->saveGlobalSettings($settings);
}
if ($type == 'instance') {
$this
->saveInstanceSettings($settings);
}
}