You are here

function Notifications_Field::parse_value in Notifications 7

Parse value from form submission

1 call to Notifications_Field::parse_value()
Notifications_Field_Autocomplete::parse_value in ./notifications.field.inc
Parsing values may be different for these ones
1 method overrides Notifications_Field::parse_value()
Notifications_Field_Autocomplete::parse_value in ./notifications.field.inc
Parsing values may be different for these ones

File

./notifications.field.inc, line 263
Drupal Notifications Framework - Default class file

Class

Notifications_Field
Base class for Notifications fields

Code

function parse_value($value) {
  switch ($this->data_type) {
    case 'int':
      return (int) $value;
    case 'float':
      return (double) $value;
    case 'string':
      return (string) $value;
    default:
      return $value;
  }
}