public function get_view_args_for_view(Ai1ec_Abstract_Query $request)
 {
     global $ai1ec_events_helper, $ai1ec_settings;
     // Define arguments for specific calendar sub-view (month, agenda,
     // posterboard, etc.)
     // Preprocess action.
     // Allow action w/ or w/o ai1ec_ prefix. Remove ai1ec_ if provided.
     $action = $request->get('action');
     if (0 === strncmp($action, 'ai1ec_', 6)) {
         $action = substr($action, 6);
     }
     $view_args = $request->get_dict(array('post_ids', 'cat_ids', 'tag_ids'));
     if ($request->is_empty_request()) {
         $view_args['cat_ids'] = $ai1ec_settings->default_categories;
         $view_args['tag_ids'] = $ai1ec_settings->default_tags;
     }
     $type = $request->get('request_type');
     $view_args['data_type'] = $this->return_data_type_for_request_type($type);
     $exact_date = $this->get_exact_date($request);
     $view_args['no_navigation'] = $request->get('no_navigation') === 'true' ? true : false;
     // Find out which view of the calendar page was requested, and render it
     // accordingly.
     $view_args['action'] = $action;
     switch ($action) {
         case 'posterboard':
         case 'stream':
         case 'agenda':
             $view_args += $request->get_dict(array('page_offset', 'time_limit'));
             if (false !== $exact_date) {
                 $view_args['time_limit'] = $ai1ec_events_helper->local_to_gmt($exact_date) - 1;
             }
             break;
         case 'month':
         case 'oneday':
         case 'week':
             $view_args["{$action}_offset"] = $request->get("{$action}_offset");
             if (false !== $exact_date) {
                 $view_args['exact_date'] = $exact_date;
             }
             break;
     }
     $view_args['request'] = $request;
     return $view_args;
 }