You are here

public function OpenlayersMaps::delete_form_submit in Openlayers 7.3

File

modules/openlayers_ui/src/Plugin/export_ui/OpenlayersMaps.php, line 27
Class openlayers_components_ui.

Class

OpenlayersMaps
Class openlayers_components_ui.

Namespace

Drupal\openlayers_ui\UI

Code

public function delete_form_submit(&$form_state) {
  parent::delete_form_submit($form_state);
  if (\Drupal::service('module_handler')
    ->moduleExists('openlayers_block')) {
    $delta = _openlayers_block_get_block_id($form_state['item']->machine_name);
    db_delete('block')
      ->condition('module', 'openlayers')
      ->condition('delta', $delta)
      ->execute();
  }
}