Added hook for the Group navigation items

This commit is contained in:
Sarven Capadisli 2009-11-10 13:52:47 +00:00
parent 91da72ede0
commit 069d3f2b2f
2 changed files with 48 additions and 39 deletions

View File

@ -191,6 +191,12 @@ StartPersonalGroupNav: beginning of personal group nav menu
EndPersonalGroupNav: end of personal group nav menu (good place to add a menu item) EndPersonalGroupNav: end of personal group nav menu (good place to add a menu item)
- $action: action object being shown - $action: action object being shown
StartGroupGroupNav: Showing the group nav menu
- $action: the current action
EndGroupGroupNav: At the end of the group nav menu
- $action: the current action
StartEndHTML: just before the </html> tag StartEndHTML: just before the </html> tag
- $action: action object being shown - $action: action object being shown

View File

@ -79,6 +79,7 @@ class GroupNav extends Widget
$nickname = $this->group->nickname; $nickname = $this->group->nickname;
$this->out->elementStart('ul', array('class' => 'nav')); $this->out->elementStart('ul', array('class' => 'nav'));
if (Event::handle('StartGroupGroupNav', array($this))) {
$this->out->menuItem(common_local_url('showgroup', array('nickname' => $this->out->menuItem(common_local_url('showgroup', array('nickname' =>
$nickname)), $nickname)),
_('Group'), _('Group'),
@ -120,6 +121,8 @@ class GroupNav extends Widget
$action_name == 'groupdesignsettings', $action_name == 'groupdesignsettings',
'nav_group_design'); 'nav_group_design');
} }
Event::handle('EndGroupGroupNav', array($this));
}
$this->out->elementEnd('ul'); $this->out->elementEnd('ul');
} }
} }