Adding data to a response?


Active member
I'm attempting to add some additional data onto the end of a response for a report. I cannot seem to get it to work right and it cuts off the content of the report.
  function actionView()
  $options = XenForo_Application::get('options');
  $response = parent::actionView();
  $data["commentHideTime"] = strtotime($options->z61_days . " days");
  return $this->responseView('XenForo_ViewPublic_Report_View', 'report_view', array_merge($data, $response->params));
Anyone know a proper way of doing this?
Last edited:

Mr. Goodie2Shoes

Well-known member
Not sure what you are trying to achieve here, but the best approach for what you've posted would be:

public function actionView()
    $return = parent::actionView();

    if ($return instanceof XenForo_ControllerResponse_View)
        $options = XenForo_Application::get('options');
        $return->params['commentHideTime'] = strtotime($options->z61_days . " days");

    return $return;