You are here

protected function BreakpointFormTrait::getExistingBreakpoints in Doubleclick for Publishers (DFP) 8

Returns the current breakpoints.

Return value

array The default value will be used unless an "input" exists in the form_state variable, in which case that will be used.

1 call to BreakpointFormTrait::getExistingBreakpoints()
Tag::form in src/Form/Tag.php
Gets the actual form array to be built.

File

src/Form/BreakpointFormTrait.php, line 183
Contains \Drupal\dfp\Form\BreakpointFormTrait.

Class

BreakpointFormTrait
Provides form for adding breakpoints to a DFP tag.

Namespace

Drupal\dfp\Form

Code

protected function getExistingBreakpoints(FormStateInterface $form_state, array $breakpoints = []) {
  $user_input = $form_state
    ->getUserInput();
  if (isset($user_input['breakpoints'])) {
    $breakpoints = $user_input['breakpoints'];
  }
  return $breakpoints;
}