You are here

function responsive_preview_form_alter in Responsive Theme Preview 8

Implements hook_form_alter().

File

./responsive_preview.module, line 62
Provides a component that previews the a page in various device dimensions.

Code

function responsive_preview_form_alter(&$form, FormStateInterface $form_state, $form_id) {

  // Add alter of form for responsive preview triggering element. So that
  // responsive preview of non saved node entity is can be executed.

  /** @var \Drupal\responsive_preview\ResponsivePreview $responsivePreviewService */
  $responsivePreviewService = \Drupal::service('responsive_preview');
  $responsivePreviewService
    ->formAlter($form, $form_state, $form_id);
}