You are here

public function deploy_ui_endpoint::edit_form_service in Deploy - Content Staging 7.3

Same name and namespace in other branches
  1. 7.2 modules/deploy_ui/plugins/export_ui/deploy_ui_endpoint.class.php \deploy_ui_endpoint::edit_form_service()

Service edit form.

File

modules/deploy_ui/plugins/export_ui/deploy_ui_endpoint.class.php, line 170
CTools export UI implementation for deploy endpoints.

Class

deploy_ui_endpoint
Deploy endpoint UI class that extends CTools Export UI.

Code

public function edit_form_service(&$form, &$form_state) {
  $item = $form_state['item'];
  if (!is_array($item->service_config)) {
    $item->service_config = unserialize($item->service_config);
  }
  $service = new $item->service_plugin((array) $item->service_config);
  $form['service_config'] = $service
    ->configForm($form_state);
  if (!empty($form['service_config'])) {
    $form['service_config']['#tree'] = TRUE;
  }
  else {
    $form['service_config'] = array(
      '#type' => 'markup',
      '#markup' => '<p>' . t('There are no settings for this service plugin.') . '</p>',
    );
  }
}