contributions/usermanagement/view/users.vieweventsink.cls.php
Go to the documentation of this file.00001 <?php 00002 /** 00003 * Catch view events to extend rendering 00004 * 00005 * @author Gerd Riesselmann 00006 * @ingroup Usermanagement 00007 */ 00008 class UsersViewEventSink implements IEventSink { 00009 /** 00010 * Invoked to handle events 00011 */ 00012 public function on_event($name, $params, &$result) { 00013 switch($name) { 00014 case 'view_before_render': 00015 $view = $params['view']; 00016 $view->assign('current_user', Users::get_current_user()); 00017 $view->assign('is_logged_in', Users::is_logged_in()); 00018 break; 00019 default: 00020 break; 00021 } 00022 } 00023 }