Jarves\Controller\Admin\FileController::setContentAction PHP Method

setContentAction() public method

public setContentAction ( FOS\RestBundle\Request\ParamFetcher $paramFetcher ) : boolean
$paramFetcher FOS\RestBundle\Request\ParamFetcher
return boolean
    public function setContentAction(ParamFetcher $paramFetcher)
    {
        $path = $paramFetcher->get('path');
        $content = $paramFetcher->get('content');
        $contentEncoding = $paramFetcher->get('contentEncoding');
        $this->checkAccess($path);
        if ('base64' === $contentEncoding) {
            $content = base64_decode($content);
        }
        if ($result = $this->webFilesystem->write($path, $content)) {
            $this->newFeed($path, 'changed content of');
        }
        return $result;
    }