You are here

function services_client_plugin_add in Services Client 7.2

Form; Add new plugin.

Parameters

EventHandler $event: Event handler that is configured.

string $type: Type of added plugin. (condition, mapping)

1 string reference to 'services_client_plugin_add'
services_client_ui::add_plugin_page in plugins/export_ui/services_client_ui.class.php
Page callback; Add new plugin.

File

./services_client.forms.inc, line 93

Code

function services_client_plugin_add($form, &$form_state, $event, $type) {
  $form_state += array(
    'event' => $event,
    'type' => $type,
  );
  $form['type'] = array(
    '#type' => 'select',
    '#title' => t('Plugin'),
    '#options' => services_client_get_plugins('condition', TRUE),
    '#required' => TRUE,
  );
  $form['actions']['submit'] = array(
    '#type' => 'submit',
    '#value' => t('Save'),
    '#action' => 'save',
  );
  $form['actions']['cancel'] = array(
    '#type' => 'submit',
    '#value' => t('Cancel'),
    '#action' => 'cancel',
  );
  return $form;
}