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: * Publisher class
14: *
15: * @copyright The XUUPS Project http://sourceforge.net/projects/xuups/
16: * @license GNU GPL 2 or later (http://www.gnu.org/licenses/gpl-2.0.html)
17: * @package Class
18: * @subpackage Utils
19: * @since 1.0
20: * @author trabis <lusopoemas@gmail.com>
21: */
22:
23: class ProfileMenusPlugin extends Xoops\Module\Plugin\PluginAbstract implements MenusPluginInterface
24: {
25: /**
26: * expects an array of array containing:
27: * name, Name of the submenu
28: * url, Url of the submenu relative to the module
29: * ex: return array(0 => array(
30: * 'name' => _MI_PUBLISHER_SUB_SMNAME3;
31: * 'url' => "search.php";
32: * ));
33: *
34: * @return array
35: */
36: public function subMenus()
37: {
38: $ret = array();
39: if (\Xoops::getInstance()->isUser()) {
40: $ret[] = array('name' => _PROFILE_MI_EDITACCOUNT, 'url' => "edituser.php");
41: $ret[] = array('name' => _PROFILE_MI_PAGE_SEARCH, 'url' => "search.php");
42: $ret[] = array('name' => _PROFILE_MI_CHANGEPASS, 'url' => "changepass.php");
43: }
44: return $ret;
45: }
46: }
47: