.

NotificationsExcludeRoute Class Reference

This routes auto-generates a token if given a notification otherwiese takes current user to generate it. More...

Inheritance diagram for NotificationsExcludeRoute:
ParameterizedRoute RouteBase IRoute IDispatcher IUrlBuilder

List of all members.

Protected Member Functions

  build_url_path ($params)
  Build the URL (except base part).

Detailed Description

This routes auto-generates a token if given a notification otherwiese takes current user to generate it.

Definition at line 6 of file notificationsexcluderoute.cls.php.


Member Function Documentation

NotificationsExcludeRoute::build_url_path ( params  )  [protected]

Build the URL (except base part).

Parameters:
mixed  $params Further parameters to use to build URL
Returns:
string

Reimplemented from ParameterizedRoute.

Definition at line 13 of file notificationsexcluderoute.cls.php.

00013                                                    {
00014                 $arr = $params;
00015                 if ($params instanceof DAONotifications) {
00016                         $user = $params->get_user();
00017                         $arr = array(
00018                                 'source' => $params->source,
00019                                 'source_id' => $params->source_id,
00020                         );
00021                 }
00022                 else {
00023                         $user = Users::get_current_user();
00024                 }
00025                 $token = $user->create_token('exclude', $arr);
00026                 $arr['token'] = $token;                 
00027                 $ret = parent::build_url_path($arr);
00028                 return $ret;
00029         }                       

The documentation for this class was generated from the following file: