function services_client_plugin_add_submit in Services Client 7.2
Submit handler; Add plugin and redirect to plugin config page.
File
- ./
services_client.forms.inc, line 124
Code
function services_client_plugin_add_submit($form, &$form_state) {
if ($form_state['clicked_button']['#action'] == 'cancel') {
$form_state['redirect'] = $form_state['event']
->getUrl('configure');
}
else {
$uuid = $form_state['event']
->addPlugin($form_state['type'], $form_state['values']['type']);
$form_state['event']
->setObjectCache();
$form_state['redirect'] = $form_state['event']
->getUrl('plugin/' . $form_state['type'] . '/' . $uuid . '/edit');
}
}