1: <?php
2: /*
3: You may not change or alter any portion of this comment or credits
4: of supporting developers from this source code or any supporting source code
5: which is considered copyrighted (c) material of the original comment or credit authors.
6:
7: This program is distributed in the hope that it will be useful,
8: but WITHOUT ANY WARRANTY; without even the implied warranty of
9: MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
10: */
11:
12: /**
13: * page module
14: *
15: * @copyright XOOPS Project (http://xoops.org)
16: * @license GNU GPL 2 or later (http://www.gnu.org/licenses/gpl-2.0.html)
17: * @package page
18: * @since 2.6.0
19: * @author DuGris (aka Laurent JEN)
20: * @version $Id$
21: */
22:
23: class Page extends Xoops\Module\Helper\HelperAbstract
24: {
25: /**
26: * Init the module
27: *
28: * @return null|void
29: */
30: public function init()
31: {
32: $this->setDirname('page');
33: }
34:
35: /**
36: * @return Page
37: */
38: public static function getInstance()
39: {
40: return parent::getInstance();
41: }
42:
43: /**
44: * @return PagePage_contentHandler
45: */
46: public function getContentHandler()
47: {
48: return $this->getHandler('page_content');
49: }
50:
51: /**
52: * @return PagePage_ratingHandler
53: */
54: public function getRatingHandler()
55: {
56: return $this->getHandler('page_rating');
57: }
58:
59: /**
60: * @return PagePage_relatedHandler
61: */
62: public function getRelatedHandler()
63: {
64: return $this->getHandler('page_related');
65: }
66:
67: /**
68: * @return PagePage_relatedHandler
69: */
70: public function getLinkHandler()
71: {
72: return $this->getHandler('page_related_link');
73: }
74:
75: /**
76: * @return PublisherGrouppermHandler
77: */
78: public function getGrouppermHandler()
79: {
80: return $this->getHandler('groupperm');
81: }
82:
83: public function getUserId()
84: {
85: if ($this->xoops()->isUser()) {
86: return $this->xoops()->user->getVar('uid');
87: }
88: return 0;
89: }
90: }
91: