Jarves\Controller\Admin\UITranslationsController::getLanguagePluralFormAction PHP Method

getLanguagePluralFormAction() public method

public getLanguagePluralFormAction ( FOS\RestBundle\Request\ParamFetcher $paramFetcher ) : string
$paramFetcher FOS\RestBundle\Request\ParamFetcher
return string javascript
    public function getLanguagePluralFormAction(ParamFetcher $paramFetcher)
    {
        $lang = $paramFetcher->get('lang');
        $lang = preg_replace('/[^a-z]/', '', $lang);
        $file = $this->translator->getPluralJsFunctionFile($lang);
        //just make sure the file has been created
        $response = new Response();
        $response->headers->set('Content-Type', 'text/javascript');
        $response->setContent($this->webFilesystem->read($file));
        return $response;
    }