public function Notifications_Subscription::set_properties in Notifications 6.4
Same name and namespace in other branches
- 7 notifications.subscription.inc \Notifications_Subscription::set_properties()
Save fields from form submission
File
- includes/
notifications_subscription.class.inc, line 190 - Drupal Notifications Framework - Default class file
Class
- Notifications_Subscription
- Message destination class
Code
public function set_properties($values, $fields) {
foreach ($fields as $key) {
if (isset($values[$key])) {
switch ($key) {
case 'fields':
if (!empty($values['parsed_fields'])) {
$this
->set_fields($values['parsed_fields']);
}
else {
$this
->set_fields($values['fields']);
}
break;
case 'destination':
$this
->set_destination($values[$key]);
break;
default:
$this->{$key} = $values[$key];
break;
}
}
}
}