Questions tagged as 'symfony-2'

1
answer

Change form before submitting it

There are 2 entities: Client and Apps. The association between client and app is made in the Client entity as follows: class Clients { /** * App id * * @ManyToOne(targetEntity="Apps", inversedBy="clients", fetch="EXT...
asked by 16.06.2016 / 18:32
1
answer

Use the __get method inside the controller

In my entity I have the following magic method : public function __get($key) { return null; } In my controller I have the following code: $clients = $this ->getDoctrine() ->getRepository("AppBundle:Clients") ->fi...
asked by 03.06.2016 / 21:43
1
answer

Use the same provider for multiple forms

In the application there are 2 login forms, one for clients and one for administrators. The 2 forms use the same provider: security: providers: form_login: entity: { class: FMP\SecurityBundle\Entity\User, property:...
asked by 11.04.2016 / 14:02
0
answers

Symfony - Problems installing in Windows 8

I'm trying to install Symfony in Windows 8, but I get the message from Windows that "This application can not be run on your PC". This occurs when, through the CLI, I try the command symfony generate:project symfony_project inside the C:...
asked by 11.03.2016 / 15:58
1
answer

Create query with date range in doctrine 2.0

I'm trying to get the records that I have processed (DateTime) less than 2 days from the current date. I'm starting from the following reasoning. public function obtemSolicitacoesAntigasParaDeletar($executar = true){ $qb = $this->...
asked by 24.02.2016 / 15:21
0
answers

Make a parser of a page

I'm trying to get information from a page through the url. I'm developing in symfony and using simple_html_dom or Crowler. But I'm not even close to doing what I need. The page I'm accessing is this: Events SESC São Carlos What I want to...
asked by 22.01.2016 / 02:07
1
answer

I created my entity in symfony - Crud

I used the command: php bin/console generate:doctrine:crud It generated all page and controllers in my project, but when I enter the route to create a user it gives the following error: Expected argument of type "string", "AppBundle\Form\...
asked by 20.12.2015 / 23:18
0
answers

Symfony2 - Problems with Doctrine2's PreUpdate

My entity Budget has some methods that run on PrePersist and PreUpdate . They are: /** * @return \DateTime */ public function generateNextPaymentDate() { if ($this->getStartsAt() !== null) { $date = new \Da...
asked by 02.11.2015 / 02:07
1
answer

symfony2 more than one security voter for a bundle

I'm having trouble creating more than one voter for each class The idea is to have a voter for each class to be able to perform security access to it, the first voter worked but the second always denied access I also noticed that in ser...
asked by 22.10.2015 / 21:27
1
answer

Update an entity after inserting data into another

I urgently need to find some way to solve this problem that has been holding me for over a week. Once solved, I believe I can use this medium to do other operations that my system will have. I have two tables, one call from Client and anoth...
asked by 10.09.2015 / 01:51