public function loadAction(Request $request)
    {
        $repository = $this->get('phlexible_media_template.template_manager');

        $templateKey = $request->get('template_key');

        $template = $repository->find($templateKey);
        $parameters = $template->getParameters();

        if (isset($parameters['method'])) {
            $parameters['xmethod'] = $parameters['method'];
            unset($parameters['method']);
        }

        return new JsonResponse(['success' => true, 'data' => $parameters]);
    }
public function loadAction(Request $request)
    {
        $repository = $this->get('phlexible_media_template.template_manager');

        $templateKey = $request->get('template_key');

        $template = $repository->find($templateKey);
        $parameters = $template->getParameters();

        if (isset($parameters['method'])) {
            $parameters['xmethod'] = $parameters['method'];
            unset($parameters['method']);
        }

        return new JsonResponse(['success' => true, 'data' => $parameters]);
    }
public function loadAction ( Request $ request ) { $ repository = $ this -> get ( 'phlexible_media_template.template_manager' ) ; $ templateKey = $ request -> get ( 'template_key' ) ; $ template = $ repository -> find ( $ templateKey ) ; $ parameters = $ template -> getParameters ( ) ; if ( isset ( $ parameters [ 'method' ] ) ) { $ parameters [ 'xmethod' ] = $ parameters [ 'method' ] ; unset ( $ parameters [ 'method' ] ) ; } return new JsonResponse ( [ 'success' => true , 'data' => $ parameters ] ) ; }
List variables.

@param Request $request

@return JsonResponse
@Route("/load", name="mediatemplates_form_load")
List variables .