You are here

function flag_flag::get_serialized_options in Flag 5

Same name and namespace in other branches
  1. 6.2 flag.inc \flag_flag::get_serialized_options()
  2. 6 flag.inc \flag_flag::get_serialized_options()
  3. 7.3 includes/flag/flag_flag.inc \flag_flag::get_serialized_options()
  4. 7.2 flag.inc \flag_flag::get_serialized_options()

Options are stored serialized in the database.

2 calls to flag_flag::get_serialized_options()
flag_flag::insert in ./flag.inc
Saves a new flag to the database. Better use save().
flag_flag::update in ./flag.inc
Saves an existing flag to the database. Better use save().

File

./flag.inc, line 729
Implements various flags. Uses object oriented style inspired by that of Views 2.

Class

flag_flag
This abstract class represents a flag, or, in Views 2 terminology, "a handler".

Code

function get_serialized_options() {
  $option_names = array_keys($this
    ->default_options());
  $options = array();
  foreach ($option_names as $option) {
    $options[$option] = $this->{$option};
  }
  return serialize($options);
}