return $options;
}
+
+ function getGroup()
+ {
+ return $this->group;
+ }
}
class GroupAdminSection extends ProfileSection
*
* @param Action $action current action, used for output
*/
- function __construct($action=null)
+ function __construct(Action $action=null)
{
parent::__construct($action);
}
}
- function item($actionName, $args, $label, $description, $id=null, $cls=null)
+ function item($actionName, array $args, $label, $description, $id=null, $cls=null)
{
if (empty($id)) {
$id = $this->menuItemID($actionName, $args);
$cls);
}
- function isCurrent($actionName, $args)
+ function isCurrent($actionName, array $args)
{
if ($actionName != $this->actionName) {
return false;
*
* @param Action $action current action, used for output
*/
- function __construct($action=null)
+ function __construct(Action $action=null)
{
parent::__construct($action);
$this->action = $action;
*
* @param Action $action current action, used for output
*/
- function __construct($action=null, $q = null)
+ function __construct(Action $action=null, $q = null)
{
parent::__construct($action);
$this->q = $q;
* Construction
*
* @param Action $action current action, used for output
+ * @param User $user Current user or NULL if "guest"
*/
- function __construct($action=null, $user=null)
+ function __construct(Action $action=null, User $user=null)
{
parent::__construct($action);
$this->user = $user;
* @param Net_URL_Mapper $m path-to-action mapper
* @return boolean hook return
*/
- function onRouterInitialized($m)
+ function onRouterInitialized(Net_URL_Mapper $m)
{
$m->connect('group/:nickname/favorited',
array('action' => 'groupfavorited'),
return true;
}
- function onEndGroupGroupNav(GroupNav $nav)
+ function onEndGroupGroupNav(Menu $nav)
{
$action_name = $nav->action->trimmed('action');
$nickname = $nav->group->nickname;
*
* @return boolean hook value
*/
- function onPluginVersion(&$versions)
+ function onPluginVersion(array &$versions)
{
$url = 'http://status.net/wiki/Plugin:GroupFavorited';
*
* @see Action
*/
- function onEndGroupGroupNav($groupnav)
+ function onEndGroupGroupNav(Menu $groupnav)
{
$action = $groupnav->action;
$group = $groupnav->group;
*
* @param GroupEditForm $form form being shown
*/
- function onEndGroupEditFormData($form)
+ function onEndGroupEditFormData(GroupEditForm $form)
{
$gps = null;
return true;
}
- function onEndGroupSaveForm($action)
+ function onEndGroupSaveForm(GroupAction $action)
{
$gps = null;
- if (!empty($action->group)) {
- $gps = Group_privacy_settings::getKV('group_id', $action->group->id);
+ if (!empty($action->getGroup())) {
+ $gps = Group_privacy_settings::getKV('group_id', $action->getGroup()->id);
}
$orig = null;
if (empty($gps)) {
$gps = new Group_privacy_settings();
- $gps->group_id = $action->group->id;
+ $gps->group_id = $action->getGroup()->id;
} else {
$orig = clone($gps);
}
*
* @return boolean hook value
*/
- function onStartInterpretCommand($cmd, $arg, $user, &$result)
+ function onStartInterpretCommand($cmd, $arg, User $user, &$result)
{
if ($cmd == 'd' || $cmd == 'dm') {
*
* @return boolean hook value
*/
- function onEndGroupActionsList($widget, $group)
+ function onEndGroupActionsList(Widget $widget, User_group $group)
{
$cur = common_current_user();
$action = $widget->out;
*
* @param
*/
- function onStartNoticeSave(&$notice) {
+ function onStartNoticeSave(Notice &$notice) {
// Look for group tags
// FIXME: won't work for remote groups
// @fixme if Notice::saveNew is refactored so we can just pull its list
*
* @return boolean hook value
*/
- function onEndGroupProfileElements($action, $group)
+ function onEndGroupProfileElements(Action $action, User_group $group)
{
$gps = Group_privacy_settings::forGroup($group);
return true;
}
- function onStartShowExportData($action)
+ function onStartShowExportData(GroupAction $action)
{
if ($action instanceof ShowgroupAction) {
- $gps = Group_privacy_settings::forGroup($action->group);
+ $gps = Group_privacy_settings::forGroup($action->getGroup());
if ($gps->allow_privacy == Group_privacy_settings::ALWAYS) {
return false;