public function removePinnedProgramCallback(array &$form, FormStateInterface $form_state) {
    $num_pinned_programs = $form_state->get('num_pinned_programs');
    if ($num_pinned_programs > 1) {
      $remove_button = $num_pinned_programs - 1;
      $form_state->set('num_pinned_programs', $remove_button);
    }
    $form_state->setRebuild();
  }
public function removePinnedProgramCallback(array &$form, FormStateInterface $form_state) {
    $num_pinned_programs = $form_state->get('num_pinned_programs');
    if ($num_pinned_programs > 1) {
      $remove_button = $num_pinned_programs - 1;
      $form_state->set('num_pinned_programs', $remove_button);
    }
    $form_state->setRebuild();
  }
public function removePinnedProgramCallback ( array & $ form , FormStateInterface $ form_state ) { $ num_pinned_programs = $ form_state -> get ( 'num_pinned_programs' ) ; if ( $ num_pinned_programs > 1 ) { $ remove_button = $ num_pinned_programs - 1 ; $ form_state -> set ( 'num_pinned_programs' , $ remove_button ) ; } $ form_state -> setRebuild ( ) ; }
Submit handler for the "remove one" button for pinned_programs.

Decrements the max counter and causes a form rebuild.

@param array $form
Form array.
@param \Drupal\Core\Form\FormStateInterface $form_state
Form state.
Submit handler for the remove one button for pinned_programs .