You are here

function acquia_purge_manualpurge_form_paths in Acquia Purge 7

Bare bones form that lets administrative users purge paths manually.

File

./acquia_purge.admin.inc, line 176
Admin page callbacks and theme functions for the Acquia Purge module.

Code

function acquia_purge_manualpurge_form_paths($form, &$form_state) {
  if (_acquia_purge_service()
    ->diagnostics()
    ->isSystemBlocked()) {
    return array();
  }

  // Retrieve the base form and register our validation and submit callbacks.
  _acquia_purge_manualpurge_base($form, $form_state);
  $form['#validate'] = array(
    '_acquia_purge_manualpurge_validate',
  );
  $form['submits']['paths']['#submit'] = array(
    '_acquia_purge_manualpurge_submit',
  );
  unset($form['submits']['page']);

  // Decorate the path items.
  foreach ($form['paths']['path'] as $i => $item) {
    $form['paths']['path'][$i]['#size'] = 20;
  }
  return $form;
}