Skip to content

Commit

Permalink
read language files
Browse files Browse the repository at this point in the history
  • Loading branch information
saibotd committed Aug 29, 2017
1 parent a930e8c commit 3b60b00
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 1 deletion.
6 changes: 5 additions & 1 deletion readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -55,8 +55,12 @@ Gets the logged-in frontend user, if available.

Gets the content of a module by id

##### /api/text?file=tl_news,modules

Gets the content of a language file by filename(s)

All routes also take the additional `lang` parameter (e.g. `?lang=de`). If you
have a multilingual website.
need to override the language.

## Custom readers

Expand Down
10 changes: 10 additions & 0 deletions src/Controller/ContentApiController.php
Original file line number Diff line number Diff line change
Expand Up @@ -81,5 +81,15 @@ public function readerAction(Request $request)
return $this->handle($request);
}

/**
* @return Response
*
* @Route("/{text}", name="content_api_text")
*/
public function textAction(Request $request)
{
return $this->handle($request);
}


}

0 comments on commit 3b60b00

Please sign in to comment.