You are here

public static function FlagTracker::update in Flag Lists 4.0.x

Same name and namespace in other branches
  1. 8 src/FlagTracker.php \Drupal\flag_lists\FlagTracker::update()

Update a FlagForLists record in the database.

Parameters

array $form: The form associative array.

Drupal\Core\Form\FormStateInterface $form_state: The formState array.

Drupal\flag_lists\FlagForList $flagTemplate: The FlagForList to be update.

1 call to FlagTracker::update()
flag_lists_save_submit in ./flag_lists.module
Form submission handler for the 'save' action.

File

src/FlagTracker.php, line 52

Class

FlagTracker
Class FlagTracker.

Namespace

Drupal\flag_lists

Code

public static function update(array $form, FormStateInterface $form_state, FlagForList $flagTemplate) {
  $flagTemplate
    ->set('label', $form_state
    ->getValue('label'));
  $flagTemplate
    ->setOwner();
  $flagTemplate
    ->save();
}