public function statusAction() { $statusLinks = new X_Page_ItemList_StatusLink(); $statusLinks->merge(X_VlcShares_Plugins::broker()->preGetStatusLinks($this)); $statusLinks->merge(X_VlcShares_Plugins::broker()->getStatusLinks($this)); $statusLinks->merge(X_VlcShares_Plugins::broker()->postGetStatusLinks($this)); $this->view->statusLinks = $statusLinks; }
function getStatusLinks(Zend_Controller_Action $controller) { $items = new X_Page_ItemList_StatusLink(); try { $username = $this->_ns->username; } catch (Exception $e) { $username = null; } if (is_null($username)) { return; } if (is_null($username)) { $username = X_Env::_('p_auth_userunknown'); } $item = new X_Page_Item_StatusLink('auth-username', X_Env::_("p_auth_welcome", "<b><i>{$username}</b></i>")); $item->setType(X_Page_Item_StatusLink::TYPE_LABEL); $items->append($item); $item = new X_Page_Item_StatusLink('auth-logout', X_Env::_('p_auth_logout')); $item->setType(X_Page_Item_StatusLink::TYPE_BUTTON)->setLink(array('controller' => 'auth', 'action' => 'logout'), 'default', true)->setHighlight(true); $items->append($item); return $items; }