/** * {@inheritdoc} */ 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(); } }
/** * {@inheritdoc} */ public function hook_menu(&$items) { parent::hook_menu($items); $items['admin/structure/openlayers/components']['type'] = MENU_LOCAL_TASK; $items['admin/structure/openlayers/components']['weight'] = 3; }