13 public $mMailjob =
null;
14 public $mActionForm =
null;
16 public function prepare(&$controller, &$xoopsUser, $moduleConfig)
19 $this->mActionForm->prepare();
21 $this->mActionForm->fetch();
24 public function &_getHandler()
26 $handler =& xoops_getmodulehandler(
'mailjob_link');
30 public function &_getFilterForm()
36 public function _getBaseUrl()
38 return './index.php?action=Mailjob_linkList';
41 public function getDefaultView(&$controller, &$xoopsUser)
43 $handler =& xoops_getmodulehandler(
'mailjob',
'user');
44 $this->mMailjob =& $handler->get($this->mActionForm->get(
'mailjob_id'));
46 if (
null == $this->mMailjob) {
47 return USER_FRAME_VIEW_ERROR;
50 return parent::getDefaultView($controller, $xoopsUser);
53 public function execute(&$controller, &$xoopsUser)
55 $this->mActionForm->validate();
56 if ($this->mActionForm->hasError()) {
57 return $this->getDefaultView($controller, $xoopsUser);
60 $mailjob_id = $this->mActionForm->get(
'mailjob_id');
61 $uidArr = $this->mActionForm->get(
'uid');
63 $handler =& xoops_getmodulehandler(
'mailjob_link',
'user');
64 foreach (array_keys($uidArr) as $uid) {
65 $mailjob_link =& $handler->get($mailjob_id, $uid);
66 if (
null != $mailjob_link) {
67 $handler->delete($mailjob_link);
71 return $this->getDefaultView($controller, $xoopsUser);
74 public function executeViewIndex(&$controller, &$xoopsUser, &$render)
76 $render->setTemplateName(
'mailjob_link_list.html');
77 #cubson::lazy_load_array('mailjob_link', $this->mObjects);
78 $render->setAttribute(
'mailJob', $this->mMailjob);
79 $render->setAttribute(
'objects', $this->mObjects);
80 $render->setAttribute(
'pageNavi', $this->mFilter->mNavi);
81 $render->setAttribute(
'actionForm', $this->mActionForm);
84 public function executeViewError(&$controller, &$xoopsUser, &$render)
86 $controller->executeForward(
'./index.php?action=MailjobList');