PHP Class Flarum\Api\Controller\ShowDiscussionController

Inheritance: extends AbstractResourceController
Show file Open project: flarum/core

Public Properties

Property Type Description
$include
$optionalInclude
$serializer

Protected Properties

Property Type Description
$discussions Flarum\Core\Repository\DiscussionRepository
$posts Flarum\Core\Repository\PostRepository

Public Methods

Method Description
__construct ( DiscussionRepository $discussions, PostRepository $posts )

Protected Methods

Method Description
data ( Psr\Http\Message\ServerRequestInterface $request, Document $document )

Private Methods

Method Description
getPostRelationships ( array $include ) : array
getPostsOffset ( Psr\Http\Message\ServerRequestInterface $request, Discussion $discussion, integer $limit ) : integer
includePosts ( Discussion $discussion, Psr\Http\Message\ServerRequestInterface $request, array $include )
loadPostIds ( Discussion $discussion, User $actor ) : array
loadPosts ( Discussion $discussion, User $actor, integer $offset, integer $limit, array $include ) : mixed

Method Details

__construct() public method

public __construct ( DiscussionRepository $discussions, PostRepository $posts )
$discussions Flarum\Core\Repository\DiscussionRepository
$posts Flarum\Core\Repository\PostRepository

data() protected method

protected data ( Psr\Http\Message\ServerRequestInterface $request, Document $document )
$request Psr\Http\Message\ServerRequestInterface
$document Tobscure\JsonApi\Document

Property Details

$discussions protected property

protected DiscussionRepository,Flarum\Core\Repository $discussions
return Flarum\Core\Repository\DiscussionRepository

$include public property

public $include

$optionalInclude public property

public $optionalInclude

$posts protected property

protected PostRepository,Flarum\Core\Repository $posts
return Flarum\Core\Repository\PostRepository

$serializer public property

public $serializer