public function ColorizedGmapBlock::stylesAddOneMore in Colorized google maps block 8
Submit handler for the "add-one-more" button.
Increments the max counter and causes a rebuild.
Parameters
array $form: Form array.
\Drupal\Core\Form\FormStateInterface $form_state: Form state.
File
- src/
Plugin/ Block/ ColorizedGmapBlock.php, line 553
Class
- ColorizedGmapBlock
- Provides a 'Example: configurable text string' block.
Namespace
Drupal\colorized_gmap\Plugin\BlockCode
public function stylesAddOneMore(array &$form, FormStateInterface $form_state) {
$styles_count = $form_state
->get('styles_count');
$styles_count++;
$form_state
->set('styles_count', $styles_count);
$form_state
->setRebuild();
}