function services_client_ui::remove_plugin_page in Services Client 7.2
Page callback; Remove existing plugin.
File
- plugins/
export_ui/ services_client_ui.class.php, line 40
Class
Code
function remove_plugin_page($js, $input, $item, $type, $uuid) {
$event = $this
->get_event_handler($item, TRUE);
// Check if valid token is provided as there is no confirmation form here.
if (!isset($_GET['token']) || !drupal_valid_token($_GET['token'], $uuid)) {
drupal_set_message(t('Invalid token'), 'error');
return MENU_ACCESS_DENIED;
}
else {
$event
->removePlugin($type, $uuid);
$event
->setObjectCache();
drupal_set_message(t('Plugin was removed.'));
}
// Redirect user back to configuration page.
drupal_goto($event
->getUrl('configure'));
}