- Timestamp:
- 07/04/08 01:30:16 (5 months ago)
- Files:
-
- 1 modified
Legend:
- Unmodified
- Added
- Removed
-
events/phpframework/piece_framework/trunk/libs/Phwittr/Interceptor/Self.php
r15132 r15136 14 14 require_once 'Piece/Unity/Service/Authentication.php'; 15 15 16 // {{{ Phwittr_Interceptor_ LayoutSetter16 // {{{ Phwittr_Interceptor_Self 17 17 18 18 /** 19 * Phwittr レイアウトセット19 * Phwittr Self Interceptor 20 20 * 21 21 * @package Phwittr_PieceFramework … … 24 24 * @since Class available since Release 0.1.0 25 25 */ 26 class Phwittr_Interceptor_ LayoutSetterextends Piece_Unity_Plugin_Common26 class Phwittr_Interceptor_Self extends Piece_Unity_Plugin_Common 27 27 { 28 28 … … 61 61 public function invoke() 62 62 { 63 $viewElement = $this->_context->getViewElement();64 63 $service = new Piece_Unity_Service_Authentication(); 64 if ($service->isAuthenticated()) { 65 $self = $this->_context->getSession()->getAttribute('self'); 66 } else { 67 $self = null; 68 } 65 69 66 if ($service->isAuthenticated()) { 67 $viewElement->setElement('isAuthenticated', true); 68 } else { 69 $viewElement->setElement('isAuthenticated', false); 70 } 70 $this->_context->setAttributeByRef('self', $self); 71 $this->_context->getViewElement()->setElementByRef('self', $self); 71 72 72 73 return true;
![(please configure the [header_logo] section in trac.ini)](/share/chrome/site/your_project_logo.png)