Ejemplo n.º 1
0
 function onUserTabs(Am_Event $event)
 {
     $user_id = $event->getUserId();
     if (!$user_id) {
         return;
     }
     $user = $this->getDi()->userTable->load($user_id, false);
     if (!$user) {
         return;
     }
     if (!$user->data()->get('subusers_count')) {
         return;
     }
     $menu = $event->getTabs();
     /* @var $menu Am_Navigation_User */
     $menu->addPage(array('id' => 'subusers', 'controller' => 'admin', 'module' => 'subusers', 'action' => 'tab', 'label' => ___('Subusers'), 'order' => 250, 'resource' => self::ADMIN_PERM_ID, 'params' => array('user_id' => $user_id)));
 }