self = $hooks->wrap( $this ); $this->appQuery = $hooks->wrap( $appQuery ); $this->auth = $hooks->wrap( $auth ); } public function checkMy( $params = array() ) { $return = FALSE; $currentUser = $this->auth->getCurrentUser(); $currentUserId = $currentUser->getId(); if( ! $currentUserId ){ return $return; } $currentUserId = $currentUser->getId(); if( ! $currentUserId ){ return $return; } // as employee $meEmployee = $this->appQuery->findEmployeeByUser( $currentUser ); if( ! $meEmployee ){ return $return; } $return = TRUE; return $return; } }