Questions tagged as 'symfony2'

2
answers

Symfony, return a Json with all the fields

I have an entity named "Courses" that has a series of attributes and one of them is "shop" which is an onetomany relation with a Entity "Shop" In the controller I have done an action that what it does is to return a JSON by applying a series...
asked by 05.02.2018 / 17:23
2
answers

Token CSRF Symfony

I am sending a request by ajax to a controller and this error is generated    ERROR: The CSRF token is not valid. Please try to send the form again. Form {{ form_start(form, {'action': path_with_locale('general_alerts'), 'attr':{'id': '...
asked by 23.01.2018 / 23:18
1
answer

Symfony, do not show a field in a Type form

Good, I have a form in Symfony of type "type" that shows a series of attributes, but in a specific case I would like to show the whole form except one field. I tried to pass from the controller to the constructor of the buildForm in the Optio...
asked by 02.02.2018 / 16:10
2
answers

Error installing composer in symfony project 2.8

How to install composer in a symfony 2.8 project with php 5.6? here's my composer.json . { "name": "SIIG/eTAB", "description": "SIIG/eTAB", "autoload": { "psr-0": { "": "src/" } }, "require": { "php": ">=5.3.3", "symfony/...
asked by 05.12.2017 / 17:43
1
answer

error timezone symfony on mac [closed]

I want to learn symfony framework. Use the documentation commands to install it on my mac and install version 2.8.28 correctly. But when I want to run the server I get this error: [Symfony\Component\Debug\Exception\ContextErrorException]...
asked by 24.10.2017 / 18:31
1
answer

Symfony 2 access database of ms sql server and mysql at the same time

I work with symfony 2.5, doctrine ... I need to access two databases at once: one in mysql on a local server and one in ms sql server 2008 on a remote server. How do I configure the connections and the parameters to access both interchangeably?...
asked by 23.08.2017 / 01:58
1
answer

Get an entity from in eventSubscriber

I am using an eventSubscriber to dynamically load a field (Patient) in a form, of which in its preSubmit function I need to obtain in addition to the id the patient's ID. The id can be obtained directly, but the ID I need to bring the ent...
asked by 24.05.2017 / 09:56
1
answer

Is it advisable to use several render controllers in a view? [closed]

I have a view that represents a dashboard, in it I include several panels with dynamically calculable data, to show each panel I use the render method (controller (...)). Is it advisable to do it this way, or to calculate all the data in the vie...
asked by 13.04.2017 / 18:51
2
answers

Symfony + wordpress

I'm doing a symfony that will have a wordpress subsection. The fact is that I have the wordpress installation under the web / wordpress folder. I followed the following manual: link But I do not know what I have to put in the routing so...
asked by 26.05.2017 / 10:04
1
answer

jsTree, how to load child nodes on demand

I am using jsTree (3.3.2) to show a hierarchical structure of entities. The way I have it configured is to load the json with the complete structure taking as root node the node to which the authenticated user belongs, but it really is not funct...
asked by 01.04.2017 / 17:43