Questions tagged as 'symfony2'

3
answers

How to pass variable from javascript to twig?

The following code is for me to load on the page a CSS or another depending on the chosen theme. This code works perfectly on page HTML pure, but when I try to take my application Symfony not found a way to pass the JS %%...
asked by 05.08.2016 / 17:34
1
answer

Securing routes under the same firewall

I have a symfony2 application with an api rest and a sonataAdmin backend. In the security.yml file I have the following: security: encoders: FOS\UserBundle\Model\UserInterface: bcrypt role_hierarchy: ROLE_ADMIN: [R...
asked by 18.05.2017 / 08:37
1
answer

Revision null when sending the form

I have a form with several embeds. I have the Budget entity, which has oneToMany relation with Revision, and revision has oneToMany with Chapter, Chapter has also oneToMany with another call Requirement, but it is not necessary to inquire more s...
asked by 23.02.2016 / 14:51
2
answers

Problem in Symfony 3 with ManyToMany Bidirectional relationship

I'm using Symfony 3 with Doctrine. In my application I have 2 entities: User and Role, and I need to make a bidirectional relationship between both entities from many to many that allows me to relate roles with users both from the User form and...
asked by 09.06.2017 / 17:36
1
answer

Duda Symfony, Ajax, Controller

How can I do what is proposed in this question, but passing a parameter to the controller from the ajax, and then, from the controller, returning to the same view where the ajax is executed that parameter through twig? This may sound redund...
asked by 05.08.2016 / 22:40
1
answer

how to fix error Attempted to load class \ "Configuration \" in symfony2? [closed]

Good morning. I am trying to integrate the docusign api to sign documents digitally. I'm following the steps for its integration (the steps are here link ), but I'm stuck in the part where I must initialize the configuration, the class already...
asked by 18.08.2016 / 15:56
1
answer

ajax response variable returns undefined in symfony

In a login page I want to click on the submit button to validate the entered data against an LDAP server and if everything is ok then proceed to the standard submit form. In the button click event I have the following code in php ) I have th...
asked by 11.05.2016 / 15:18
1
answer

swiftmailer Config

I am setting swiftmailer in symfony , PHP 5.6.* , xampp I have a problem when carrying out tests to send emails, my configuration for swiftmailer is as follows: mailer_transport: smtp mailer_host: ###.###.##...
asked by 27.06.2016 / 21:17
1
answer

How to know if a SQL was executed correctly, Symfony 2?

I use the following code to run an SQL file in my symfony 2.7 application, and it works, but I want to know how to validate if the query ran correctly or not. This is my code: public function importarAction(Request $request) { /**...
asked by 03.07.2016 / 07:22
0
answers

Error validating form with compound

Good, I have two forms, one of them is based on a collection of elements of the other. The form works well with the events but it fails when I send it, it always returns an error that is the following:    Symfony \ Component \ Validator \ Con...
asked by 09.03.2016 / 18:51