You are here

function flag_flag::form_input in Flag 7.3

Same name and namespace in other branches
  1. 5 flag.inc \flag_flag::form_input()
  2. 6.2 flag.inc \flag_flag::form_input()
  3. 6 flag.inc \flag_flag::form_input()
  4. 7.2 flag.inc \flag_flag::form_input()

Update the flag with settings entered in a form.

1 call to flag_flag::form_input()
flag_user::form_input in includes/flag/flag_user.inc
Update the flag with settings entered in a form.
1 method overrides flag_flag::form_input()
flag_user::form_input in includes/flag/flag_user.inc
Update the flag with settings entered in a form.

File

includes/flag/flag_flag.inc, line 250
Contains the flag_flag class. Flag type classes use an 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 form_input($form_values) {

  // Load the form fields indiscriminately unto the flag (we don't care about
  // stray FormAPI fields because we aren't touching unknown properties
  // anyway).
  foreach ($form_values as $field => $value) {
    $this->{$field} = $value;
  }
  $this->types = array_values(array_filter($this->types));

  // Clear internal titles cache:
  $this
    ->get_title(NULL, TRUE);
}