Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore[tags]: Change some methods from private to protected, to be able to extend the affected classes #3802

Merged
merged 1 commit into from
Apr 21, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions extensions/tags/src/Content/Tag.php
Original file line number Diff line number Diff line change
Expand Up @@ -113,20 +113,20 @@ public function __invoke(Document $document, Request $request)
*
* @return array
*/
private function getSortMap()
protected function getSortMap()
{
return resolve('flarum.forum.discussions.sortmap');
}

/**
* Get the result of an API request to list discussions.
*/
private function getApiDocument(Request $request, array $params)
protected function getApiDocument(Request $request, array $params)
{
return json_decode($this->api->withParentRequest($request)->withQueryParams($params)->get('/discussions')->getBody());
}

private function getTagsDocument(Request $request, string $slug)
protected function getTagsDocument(Request $request, string $slug)
{
return json_decode($this->api->withParentRequest($request)->withQueryParams([
'include' => 'children,children.parent,parent,parent.children.parent,state'
Expand Down
2 changes: 1 addition & 1 deletion extensions/tags/src/Content/Tags.php
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ public function __invoke(Document $document, Request $request)
return $document;
}

private function getTagsDocument(Request $request)
protected function getTagsDocument(Request $request)
{
return json_decode($this->api->withParentRequest($request)->withQueryParams([
'include' => 'children,lastPostedDiscussion,parent'
Expand Down