botcha.application.controller.d6adapter.inc in BOTCHA Spam Prevention 6.4
File
controller/application/decorator/d6adapter/botcha.application.controller.d6adapter.inc
View source
<?php
define('MENU_IS_LOCAL_ACTION', 0x100);
define('MENU_LOCAL_ACTION', MENU_IS_LOCAL_TASK | MENU_IS_LOCAL_ACTION | MENU_VISIBLE_IN_BREADCRUMB);
class BotchaD6Adapter extends ApplicationAdapter {
const ADMIN_PATH = 'admin/user/botcha';
const PEOPLE_PATH = 'admin/user';
const PERMISSIONS_PATH = 'admin/user/permissions';
const COMMENT_FORM_ID = 'comment_form';
const CONTROLLER_TYPE_FORM = 'Form';
const CONTROLLER_TYPE_RECIPE = 'Recipe';
const CONTROLLER_TYPE_RECIPEBOOK = 'Recipebook';
protected $ctrls = array(
self::CONTROLLER_TYPE_FORM,
self::CONTROLLER_TYPE_RECIPE,
self::CONTROLLER_TYPE_RECIPEBOOK,
);
protected $app_name = 'Botcha';
public function form_alter(&$form, &$form_state, $form_id) {
$this->original
->form_alter($form, $form_state, $form_id);
}
public function help($path, $arg) {
return $this->original
->help($path, $arg);
}
public function menu() {
$menus = $this->original
->menu();
foreach ($menus as $menu) {
switch ($menu['type']) {
case MENU_LOCAL_TASK:
$menu['type'] = MENU_LOCAL_TASK + MENU_NORMAL_ITEM;
break;
case MENU_LOCAL_ACTION:
$menu['type'] = MENU_CALLBACK;
}
}
return $menus;
}
public function perm() {
$perms = array();
$permissions = $this->original
->permission();
$perms = array_keys($permissions);
return $perms;
}
public function recipebook_title($recipebook) {
return $this->original
->recipebook_title($recipebook);
}
public function getAdminForm(&$form_state, $form_name) {
$form = array();
$args = func_get_args();
$object_to_edit = isset($args[2]) ? $args[2] : NULL;
return $this->original
->getAdminForm($form, $form_state, $form_name, $object_to_edit);
}
public function submitAdminForm($form, &$form_state) {
$this->original
->submitAdminForm($form, $form_state);
}
public function generateSecretKey() {
return $this->original
->generateSecretKey();
}
public function formExists($value) {
return $this->original
->formExists($value);
}
public function recipebookExists($value) {
return $this->original
->recipebookExists($value);
}
public function formValidate($form, &$form_state) {
$this->original
->formValidate($form, $form_state);
}
public function admin_path() {
return self::ADMIN_PATH;
}
public function people_path() {
return self::PEOPLE_PATH;
}
public function permissions_path() {
return self::PERMISSIONS_PATH;
}
}