You are here

public function deploy_ui_plan::edit_form_aggregator in Deploy - Content Staging 7.3

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

Form form configuring the aggegator.

File

modules/deploy_ui/plugins/export_ui/deploy_ui_plan.class.php, line 240
Deploy UI for managing deployment plans.

Class

deploy_ui_plan
CTools Export UI class for deployment plans.

Code

public function edit_form_aggregator(&$form, &$form_state) {
  $item = $form_state['item'];
  if (!is_array($item->aggregator_config)) {
    $item->aggregator_config = unserialize($item->aggregator_config);
  }

  // Create the aggregator object.
  $aggregator = new $item->aggregator_plugin(NULL, (array) $item->aggregator_config);
  $form['aggregator_config'] = $aggregator
    ->configForm($form_state);
  if (!empty($form['aggregator_config'])) {
    $form['aggregator_config']['#tree'] = TRUE;
  }
  else {
    $form['empty'] = array(
      '#type' => 'markup',
      '#markup' => '<p>' . t('There are no settings for this aggregator plugin.') . '</p>',
    );
  }
}