public function EntitySaveHandler::configForm in Services Client 7.2
Configuration form.
Overrides EventHandler::configForm
2 calls to EntitySaveHandler::configForm()
- NodeSaveHandler::configForm in include/
event.inc - Configuration form.
- UserSaveHandler::configForm in include/
event.inc - Config form.
2 methods override EntitySaveHandler::configForm()
- NodeSaveHandler::configForm in include/
event.inc - Configuration form.
- UserSaveHandler::configForm in include/
event.inc - Config form.
File
- include/
event.inc, line 852
Class
- EntitySaveHandler
- General entity save handler.
Code
public function configForm(&$form, &$form_state) {
// Show conditions
$mapping = array();
foreach ($this->config['mapping'] as $uuid => $plugin) {
try {
$handler = $this
->getPluginInstance($plugin['type'], $plugin['config'], $uuid);
$mapping[] = array(
$handler
->getReaderSummary(),
$handler
->getFormatterSummary(),
implode(' | ', array(
l(t('Edit'), $this
->getUrl('plugin/mapping/' . $uuid . '/edit')),
l(t('Remove'), $this
->getUrl('plugin/mapping/' . $uuid . '/remove'), array(
'query' => array(
'token' => drupal_get_token($uuid),
),
)),
)),
);
} catch (Exception $e) {
watchdog_exception('services_client', $e);
}
}
$form['mapping']['title'] = array(
'#markup' => '<h2>' . t('Mapping') . '</h2>',
);
$form['mapping']['table'] = array(
'#theme' => 'table',
'#header' => array(
t('Source (local)'),
t('Destination (remote)'),
t('Actions'),
),
'#rows' => $mapping,
'#empty' => t('There are no mappings added'),
);
$form['mapping']['add_mapping'] = array(
'#theme_wrappers' => array(
'container',
),
'#markup' => l('+ ' . t('Add mapping'), $this
->getUrl('add_plugin/mapping')),
);
parent::configForm($form, $form_state);
}