1: <?php
2: 3: 4: 5:
6:
7: if (!defined('XOOPS_ROOT_PATH')) exit();
8:
9: class User_AbstractViewAction extends User_Action
10: {
11: var $mObject = null;
12: var $mObjectHandler = null;
13:
14: function User_AbstractViewAction()
15: {
16: }
17:
18: function _getId()
19: {
20: }
21:
22: function &_getHandler()
23: {
24: }
25:
26: function _setupObject()
27: {
28: $id = $this->_getId();
29:
30: $this->mObjectHandler =& $this->_getHandler();
31:
32: $this->mObject =& $this->mObjectHandler->get($id);
33: }
34:
35: 36: 37: 38: 39: 40: 41:
42: protected function _getPageAction()
43: {
44: return _VIEW;
45: }
46:
47: function prepare(&$controller, &$xoopsUser, &$moduleConfig)
48: {
49: $this->_setupObject();
50: }
51:
52: function getDefaultView(&$controller, &$xoopsUser)
53: {
54: if ($this->mObject == null) {
55: return USER_FRAME_VIEW_ERROR;
56: }
57:
58: return USER_FRAME_VIEW_SUCCESS;
59: }
60:
61: function execute(&$controller, &$xoopsUser)
62: {
63: return $this->getDefaultView($controller, $xoopsUser);
64: }
65: }
66:
67: ?>
68: