You are here

public function GridFormController::save in Grid builder 8

Overrides Drupal\Core\Entity\EntityFormController::save().

File

lib/Drupal/gridbuilder/GridFormController.php, line 162
Definition of Drupal\gridbuilder\GridFormController.

Class

GridFormController
Form controller for the grid edit/add forms.

Namespace

Drupal\gridbuilder

Code

public function save(array $form, array &$form_state) {
  $grid = $this
    ->getEntity($form_state);
  $grid
    ->save();
  watchdog('gridbuilder', 'Grid @label saved.', array(
    '@label' => $grid
      ->label(),
  ), WATCHDOG_NOTICE);
  drupal_set_message(t('Grid %label saved.', array(
    '%label' => $grid
      ->label(),
  )));
  $form_state['redirect'] = 'admin/structure/grids';
}