00001 <?php
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026 require_once FASTFRAME_ROOT . 'lib/FastFrame/ActionHandlerConfig.php';
00027 require_once dirname(__FILE__) . '/../Model/Reddot.php';
00028 require_once dirname(__FILE__) . '/actions.php';
00029
00030
00031
00032
00043
00044 class FF_ActionHandlerConfig_Reddot extends FF_ActionHandlerConfig {
00045
00046
00053 function loadConfig()
00054 {
00055 $appName = $this->actionHandler->o_registry->getCurrentApp();
00056 $this->actionHandler->setDefaultActionId(ACTION_LIST);
00057 $this->actionHandler->batchModifyActions(
00058 array(ACTION_LIST, ACTION_EDIT, ACTION_ADD, ACTION_EDIT_SUBMIT, ACTION_ADD_SUBMIT, ACTION_DELETE, ACTION_DISPLAY),
00059 $this->actionHandler->o_registry->getAppFile('Action', $appName, 'libs'),
00060 '_Reddot',
00061 'Reddot'
00062 );
00063 $this->actionHandler->addAction(
00064 ACTION_LIST_ALL,
00065 $this->actionHandler->o_registry->getAppFile('Action/ReddotList.php', $appName, 'libs'),
00066 'FF_Action_List_Reddot'
00067 );
00068 $this->actionHandler->addAction(
00069 ACTION_CANCEL_REDDOT,
00070 $this->actionHandler->o_registry->getAppFile('Action/ReddotCancel.php', $appName, 'libs'),
00071 'FF_Action_Form_ReddotCancel'
00072 );
00073 $this->actionHandler->addAction(
00074 ACTION_CANCEL_REDDOT_SUBMIT,
00075 $this->actionHandler->o_registry->getAppFile('Action/ReddotCancelSubmit.php', $appName, 'libs'),
00076 'FF_Action_FormSubmit_ReddotCancel'
00077 );
00078 $this->actionHandler->o_model =& new FF_Model_Reddot();
00079 }
00080
00081
00082
00083
00092 function checkPerms()
00093 {
00094 $o_perms =& FF_Perms::factory();
00095 if (!$o_perms->hasPerm(array('can_use_reddot'))) {
00096 $this->actionHandler->setActionId(ACTION_PROBLEM);
00097 $o_output =& FF_Output::factory();
00098 $o_output->setMessage(_('You do not have permission to use the RedDot module.'), FASTFRAME_ERROR_MESSAGE);
00099 return false;
00100 }
00101
00102 return true;
00103 }
00104
00105
00106 }
00107 ?>