You are here

public function BotchaForm::addAdminLinks in BOTCHA Spam Prevention 7.3

Same name and namespace in other branches
  1. 6.3 controller/form/botcha.form.controller.inc \BotchaForm::addAdminLinks()
1 call to BotchaForm::addAdminLinks()
BotchaFormNone::addAdminLinks in controller/form/botcha.form.controller.inc
1 method overrides BotchaForm::addAdminLinks()
BotchaFormNone::addAdminLinks in controller/form/botcha.form.controller.inc

File

controller/form/botcha.form.controller.inc, line 142
Controller layer of the BotchaForm objects.

Class

BotchaForm

Code

public function addAdminLinks(&$form) {
  $form_id = $form['form_id']['#value'];
  if (variable_get('botcha_administration_mode', FALSE) && user_access('administer BOTCHA settings') && (arg(0) != 'admin' || variable_get('botcha_allow_on_admin_pages', FALSE) || $form_id == 'user_register') && $form_id != 'update_script_selection_form') {

    // Add BOTCHA administration tools.
    $botcha_element = $this
      ->createAdminLinksFieldset($form_id);

    // Get placement in form and insert in form.
    // @todo Make away with a dependency from botcha.inc.
    $botcha_placement = _botcha_get_botcha_placement($form_id, $form);
    _botcha_insert_botcha_element($form, $botcha_placement, $botcha_element);
  }
}