all nav menus use menu superclass

This commit is contained in:
Evan Prodromou 2011-03-01 06:00:03 -05:00
parent d6d3dfda81
commit a64c6c5015
7 changed files with 20 additions and 89 deletions

View File

@ -49,9 +49,8 @@ require_once INSTALLDIR.'/lib/widget.php';
* @see HTMLOutputter * @see HTMLOutputter
*/ */
class GroupNav extends Widget class GroupNav extends Menu
{ {
var $action = null;
var $group = null; var $group = null;
/** /**
@ -63,7 +62,6 @@ class GroupNav extends Widget
function __construct($action=null, $group=null) function __construct($action=null, $group=null)
{ {
parent::__construct($action); parent::__construct($action);
$this->action = $action;
$this->group = $group; $this->group = $group;
} }

View File

@ -44,21 +44,8 @@ require_once INSTALLDIR.'/lib/widget.php';
* *
* @see Widget * @see Widget
*/ */
class LoginGroupNav extends Widget class LoginGroupNav extends Menu
{ {
var $action = null;
/**
* Construction
*
* @param Action $action current action, used for output
*/
function __construct($action=null)
{
parent::__construct($action);
$this->action = $action;
}
/** /**
* Show the menu * Show the menu
* *

View File

@ -2,7 +2,7 @@
/** /**
* StatusNet, the distributed open-source microblogging tool * StatusNet, the distributed open-source microblogging tool
* *
* Base class for all actions (~views) * Menu for personal group of actions
* *
* PHP version 5 * PHP version 5
* *
@ -19,11 +19,11 @@
* You should have received a copy of the GNU Affero General Public License * You should have received a copy of the GNU Affero General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>. * along with this program. If not, see <http://www.gnu.org/licenses/>.
* *
* @category Action * @category Menu
* @package StatusNet * @package StatusNet
* @author Evan Prodromou <evan@status.net> * @author Evan Prodromou <evan@status.net>
* @author Sarven Capadisli <csarven@status.net> * @author Sarven Capadisli <csarven@status.net>
* @copyright 2008 StatusNet, Inc. * @copyright 2008-2011 StatusNet, Inc.
* @license http://www.fsf.org/licensing/licenses/agpl-3.0.html GNU Affero General Public License version 3.0 * @license http://www.fsf.org/licensing/licenses/agpl-3.0.html GNU Affero General Public License version 3.0
* @link http://status.net/ * @link http://status.net/
*/ */
@ -32,41 +32,20 @@ if (!defined('STATUSNET') && !defined('LACONICA')) {
exit(1); exit(1);
} }
require_once INSTALLDIR.'/lib/widget.php';
/** /**
* Base class for all actions * Menu for personal group of actions
* *
* This is the base class for all actions in the package. An action is * @category Menu
* more or less a "view" in an MVC framework.
*
* Actions are responsible for extracting and validating parameters; using
* model classes to read and write to the database; and doing ouput.
*
* @category Output
* @package StatusNet * @package StatusNet
* @author Evan Prodromou <evan@status.net> * @author Evan Prodromou <evan@status.net>
* @author Sarven Capadisli <csarven@status.net> * @author Sarven Capadisli <csarven@status.net>
* @copyright 2008-2011 StatusNet, Inc.
* @license http://www.fsf.org/licensing/licenses/agpl-3.0.html GNU Affero General Public License version 3.0 * @license http://www.fsf.org/licensing/licenses/agpl-3.0.html GNU Affero General Public License version 3.0
* @link http://status.net/ * @link http://status.net/
*
* @see HTMLOutputter
*/ */
class PersonalGroupNav extends Widget
class PersonalGroupNav extends Menu
{ {
var $action = null;
/**
* Construction
*
* @param Action $action current action, used for output
*/
function __construct($action=null)
{
parent::__construct($action);
$this->action = $action;
}
/** /**
* Show the menu * Show the menu
* *

View File

@ -46,22 +46,8 @@ require_once INSTALLDIR.'/lib/widget.php';
* @see Widget * @see Widget
*/ */
class PublicGroupNav extends Widget class PublicGroupNav extends Menu
{ {
var $action = null;
/**
* Construction
*
* @param Action $action current action, used for output
*/
function __construct($action=null)
{
parent::__construct($action);
$this->action = $action;
}
/** /**
* Show the menu * Show the menu
* *

View File

@ -2,7 +2,7 @@
/** /**
* StatusNet, the distributed open-source microblogging tool * StatusNet, the distributed open-source microblogging tool
* *
* Menu for search actions * Menu for search group of actions
* *
* PHP version 5 * PHP version 5
* *
@ -22,7 +22,7 @@
* @category Menu * @category Menu
* @package StatusNet * @package StatusNet
* @author Evan Prodromou <evan@status.net> * @author Evan Prodromou <evan@status.net>
* @copyright 2008 StatusNet, Inc. * @copyright 2008-2011 StatusNet, Inc.
* @license http://www.fsf.org/licensing/licenses/agpl-3.0.html GNU Affero General Public License version 3.0 * @license http://www.fsf.org/licensing/licenses/agpl-3.0.html GNU Affero General Public License version 3.0
* @link http://status.net/ * @link http://status.net/
*/ */
@ -31,12 +31,10 @@ if (!defined('STATUSNET') && !defined('LACONICA')) {
exit(1); exit(1);
} }
require_once INSTALLDIR.'/lib/widget.php';
/** /**
* Menu for public group of actions * Menu for public group of actions
* *
* @category Output * @category Menu
* @package StatusNet * @package StatusNet
* @author Evan Prodromou <evan@status.net> * @author Evan Prodromou <evan@status.net>
* @license http://www.fsf.org/licensing/licenses/agpl-3.0.html GNU Affero General Public License version 3.0 * @license http://www.fsf.org/licensing/licenses/agpl-3.0.html GNU Affero General Public License version 3.0
@ -45,9 +43,8 @@ require_once INSTALLDIR.'/lib/widget.php';
* @see Widget * @see Widget
*/ */
class SearchGroupNav extends Widget class SearchGroupNav extends Menu
{ {
var $action = null;
var $q = null; var $q = null;
/** /**
@ -59,7 +56,6 @@ class SearchGroupNav extends Widget
function __construct($action=null, $q = null) function __construct($action=null, $q = null)
{ {
parent::__construct($action); parent::__construct($action);
$this->action = $action;
$this->q = $q; $this->q = $q;
} }

View File

@ -1,7 +1,7 @@
<?php <?php
/** /**
* StatusNet - the distributed open-source microblogging tool * StatusNet - the distributed open-source microblogging tool
* Copyright (C) 2010, StatusNet, Inc. * Copyright (C) 2010,2011, StatusNet, Inc.
* *
* Settings menu * Settings menu
* *
@ -23,7 +23,7 @@
* @category Widget * @category Widget
* @package StatusNet * @package StatusNet
* @author Evan Prodromou <evan@status.net> * @author Evan Prodromou <evan@status.net>
* @copyright 2010 StatusNet, Inc. * @copyright 2010,2011 StatusNet, Inc.
* @license http://www.fsf.org/licensing/licenses/agpl-3.0.html AGPL 3.0 * @license http://www.fsf.org/licensing/licenses/agpl-3.0.html AGPL 3.0
* @link http://status.net/ * @link http://status.net/
*/ */
@ -46,21 +46,8 @@ if (!defined('STATUSNET')) {
* @see HTMLOutputter * @see HTMLOutputter
*/ */
class SettingsNav extends Widget class SettingsNav extends Menu
{ {
var $action = null;
/**
* Construction
*
* @param Action $action current action, used for output
*/
function __construct($action=null)
{
parent::__construct($action);
$this->action = $action;
}
/** /**
* Show the menu * Show the menu
* *

View File

@ -22,7 +22,7 @@
* @category Subs * @category Subs
* @package StatusNet * @package StatusNet
* @author Evan Prodromou <evan@status.net> * @author Evan Prodromou <evan@status.net>
* @copyright 2008-2009 StatusNet, Inc. * @copyright 2008-2011 StatusNet, Inc.
* @license http://www.fsf.org/licensing/licenses/agpl-3.0.html GNU Affero General Public License version 3.0 * @license http://www.fsf.org/licensing/licenses/agpl-3.0.html GNU Affero General Public License version 3.0
* @link http://status.net/ * @link http://status.net/
*/ */
@ -43,9 +43,8 @@ require_once INSTALLDIR.'/lib/widget.php';
* @link http://status.net/ * @link http://status.net/
*/ */
class SubGroupNav extends Widget class SubGroupNav extends Menu
{ {
var $action = null;
var $user = null; var $user = null;
/** /**
@ -57,7 +56,6 @@ class SubGroupNav extends Widget
function __construct($action=null, $user=null) function __construct($action=null, $user=null)
{ {
parent::__construct($action); parent::__construct($action);
$this->action = $action;
$this->user = $user; $this->user = $user;
} }