add hook for showing account settings menu
This commit is contained in:
parent
b3ba7669df
commit
84ca1482ff
@ -128,3 +128,9 @@ StartLoginGroupNav: Before showing the login and register navigation menu
|
|||||||
|
|
||||||
EndLoginGroupNav: After showing the login and register navigation menu
|
EndLoginGroupNav: After showing the login and register navigation menu
|
||||||
- $action: the current action
|
- $action: the current action
|
||||||
|
|
||||||
|
StartAccountSettingsNav: Before showing the account settings menu
|
||||||
|
- $action: the current action
|
||||||
|
|
||||||
|
EndAccountSettingsNav: After showing the account settings menu
|
||||||
|
- $action: the current action
|
||||||
|
@ -98,7 +98,11 @@ class AccountSettingsNav extends Widget
|
|||||||
|
|
||||||
function show()
|
function show()
|
||||||
{
|
{
|
||||||
# action => array('prompt', 'title')
|
$action_name = $this->action->trimmed('action');
|
||||||
|
$this->action->elementStart('ul', array('class' => 'nav'));
|
||||||
|
|
||||||
|
if (Event::handle('StartAccountSettingsNav', array(&$this->action))) {
|
||||||
|
|
||||||
$menu =
|
$menu =
|
||||||
array('profilesettings' =>
|
array('profilesettings' =>
|
||||||
array(_('Profile'),
|
array(_('Profile'),
|
||||||
@ -122,9 +126,6 @@ class AccountSettingsNav extends Widget
|
|||||||
array(_('Other'),
|
array(_('Other'),
|
||||||
_('Other options')));
|
_('Other options')));
|
||||||
|
|
||||||
$action_name = $this->action->trimmed('action');
|
|
||||||
$this->action->elementStart('ul', array('class' => 'nav'));
|
|
||||||
|
|
||||||
foreach ($menu as $menuaction => $menudesc) {
|
foreach ($menu as $menuaction => $menudesc) {
|
||||||
$this->action->menuItem(common_local_url($menuaction),
|
$this->action->menuItem(common_local_url($menuaction),
|
||||||
$menudesc[0],
|
$menudesc[0],
|
||||||
@ -132,6 +133,9 @@ class AccountSettingsNav extends Widget
|
|||||||
$action_name === $menuaction);
|
$action_name === $menuaction);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Event::handle('EndAccountSettingsNav', array(&$this->action));
|
||||||
|
}
|
||||||
|
|
||||||
$this->action->elementEnd('ul');
|
$this->action->elementEnd('ul');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user