1
0
mirror of https://github.com/flarum/core.git synced 2025-08-01 22:20:21 +02:00

Change some methods from private to protected, to be able to extend the affected classes (#3802)

This commit is contained in:
Rafael Horvat
2023-04-21 08:42:42 +02:00
committed by GitHub
parent 803f0cd0f4
commit 1d20f4d4aa
2 changed files with 4 additions and 4 deletions

View File

@@ -113,7 +113,7 @@ class Tag
* *
* @return array * @return array
*/ */
private function getSortMap() protected function getSortMap()
{ {
return resolve('flarum.forum.discussions.sortmap'); return resolve('flarum.forum.discussions.sortmap');
} }
@@ -121,12 +121,12 @@ class Tag
/** /**
* Get the result of an API request to list discussions. * 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()); 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([ return json_decode($this->api->withParentRequest($request)->withQueryParams([
'include' => 'children,children.parent,parent,parent.children.parent,state' 'include' => 'children,children.parent,parent,parent.children.parent,state'

View File

@@ -100,7 +100,7 @@ class Tags
return $document; return $document;
} }
private function getTagsDocument(Request $request) protected function getTagsDocument(Request $request)
{ {
return json_decode($this->api->withParentRequest($request)->withQueryParams([ return json_decode($this->api->withParentRequest($request)->withQueryParams([
'include' => 'children,lastPostedDiscussion,parent' 'include' => 'children,lastPostedDiscussion,parent'