You are here

public function EnvironmentIndicatorFormController::save in Environment Indicator 8.2

Save your config entity.

There will eventually be default code to rely on here, but it doesn't exist yet.

File

lib/Drupal/environment_indicator/EnvironmentIndicatorFormController.php, line 78

Class

EnvironmentIndicatorFormController

Namespace

Drupal\environment_indicator

Code

public function save(array $form, array &$form_state) {
  $environment = $this
    ->getEntity($form_state);
  $environment
    ->save();
  drupal_set_message(t('Saved the %label environment.', array(
    '%label' => $environment
      ->label(),
  )));
  $form_state['redirect'] = 'admin/config/development/environment-indicator';
}