original_string: public function get_discussion_exporter(
          stdClass $user,
          forum_entity $forum,
          discussion_entity $discussion,
          array $groupsbyid = [],
          array $favouriteids = []
      ) : discussion_exporter {
          return new discussion_exporter($discussion, [
              'context' => $forum->get_context(),
              'forum' => $forum,
              'capabilitymanager' => $this->managerfactory->get_capability_manager($forum),
              'urlfactory' => $this->urlfactory,
              'user' => $user,
              'legacydatamapperfactory' => $this->legacydatamapperfactory,
              'latestpostid' => null,
              'groupsbyid' => $groupsbyid,
              'favouriteids' => $favouriteids
          ]);
      }
code: public function get_discussion_exporter(
          stdClass $user,
          forum_entity $forum,
          discussion_entity $discussion,
          array $groupsbyid = [],
          array $favouriteids = []
      ) : discussion_exporter {
          return new discussion_exporter($discussion, [
              'context' => $forum->get_context(),
              'forum' => $forum,
              'capabilitymanager' => $this->managerfactory->get_capability_manager($forum),
              'urlfactory' => $this->urlfactory,
              'user' => $user,
              'legacydatamapperfactory' => $this->legacydatamapperfactory,
              'latestpostid' => null,
              'groupsbyid' => $groupsbyid,
              'favouriteids' => $favouriteids
          ]);
      }
code_tokens: public function get_discussion_exporter ( stdClass $ user , forum_entity $ forum , discussion_entity $ discussion , array $ groupsbyid = [ ] , array $ favouriteids = [ ] ) : discussion_exporter { return new discussion_exporter ( $ discussion , [ 'context' => $ forum -> get_context ( ) , 'forum' => $ forum , 'capabilitymanager' => $ this -> managerfactory -> get_capability_manager ( $ forum ) , 'urlfactory' => $ this -> urlfactory , 'user' => $ user , 'legacydatamapperfactory' => $ this -> legacydatamapperfactory , 'latestpostid' => null , 'groupsbyid' => $ groupsbyid , 'favouriteids' => $ favouriteids ] ) ; }
docstring: Construct a new discussion exporter for the specified user and forum discussion.
  
  @param   stdClass          $user The user viewing the forum
  @param   forum_entity      $forum The forum being viewed
  @param   discussion_entity $discussion The discussion being viewed
  @param   stdClass[]        $groupsbyid The list of groups in the forum
  @return  discussion_exporter
docstring_tokens: Construct a new discussion exporter for the specified user and forum discussion .