Questions tagged [symfony-2.5]

This is the Symfony 2.5.x specific tag. Use it in addition to the symfony2 tag if your question is specific to Symfony 2.5.x — not just 2.x.

Symfony is a PHP full-stack web framework developed and maintained by Sensio Labs.

Information

This tag is specific for the 2.5 version of Symfony, which was released on the 1st June 2014. See the tag for general Symfony 2.x questions.

As of 1 June 2014, the latest stable release of Symfony 2.5 is version 2.5.0.

Living on the edge

There are a set of interesting links on the symfony blog about what's new in this version:

Useful links

152 questions
2
votes
1 answer

Use multiple templates with KnpPaginatorBundle

I use KnpPaginatorBundle to manage pagination in the backoffice of my site and it works well I configured it to use a custom templates knp_paginator: template: pagination: MyappMainBundle::pagination.html.twig Then, I want to use the…
Mario Radomanana
  • 1,698
  • 1
  • 21
  • 31
2
votes
1 answer

Validate choice list in Symfony2

I have a choice list where user can choose one value, but there I even set an empty value if the user doesn't select anything. The form does not have model, to use @Assert annotation with it, and the choice field is optional, so in some case it will…
nowiko
  • 2,507
  • 6
  • 38
  • 82
2
votes
0 answers

adding behavior without schema file

Currently I am dealing with 'glorpen bundle' and stuck in implementing Behavior to user class without adding it to user schema. Can anybody help me to figure this out? Thanks in advance.
Bijesh Shrestha
  • 371
  • 2
  • 15
2
votes
2 answers

Symfony making part of a form optional on submit

I'm currently having trouble with shutting down some validation constraints if a certain option is selected in the form. This option is not related to the model and is not set using the data_class option. My form contains two embedded address forms…
stixx
  • 142
  • 1
  • 8
2
votes
3 answers

How to add a css class to select option?

I am trying to add some CSS classes to specific options of my select. It is no problem to add it to the select itself with the attr: 'attr'=>array('style'=>'width:300px', 'class'=>'class'), But I want to add the class to the options itself:
CSchulz
  • 10,882
  • 11
  • 60
  • 114
2
votes
0 answers

How to get all form errors as array?

I have a simple form using only form types delivered by the form package and want to get all form errors. ->createBuilder('form', $preselects, array('error_bubbling' => false)) ->add('wealth', 'integer', array( 'constraints' => array( …
CSchulz
  • 10,882
  • 11
  • 60
  • 114
2
votes
1 answer

[PDOException]: SQLSTATE[28000] [1045] Access denied for user 'root'@'localhost' (using password: NO) Symfony2

I tried to create my DB with Symfony2. I used the command: php app/console doctrine:create:database The result is: [PDOException] : SQLSTATE[28000] [1045] Access denied for user 'root'@'localhost' (using password: NO) This is my…
user3816170
  • 319
  • 12
  • 20
1
vote
0 answers

Symfony - Class Omnipay\PayPal\ExpressGateway not found

I'm trying to integrate the Omnipay Paypal package with my Symfony2.5 application. I've installed the colinodell/omnipay-bundle package, and followed the instructions on how to set it up. Set config as: omnipay: methods: PayPal_Express: …
1
vote
1 answer

symfony2 download file The Response content must be a string

i want download my pdf file where he's saved in my phpmyadmin 'blob' i try this code: public function downloadAction() { $ma_base_de_donne = new myprojectdbEntity(); $item =…
1
vote
2 answers

Symfony 2.5: Redirect from any page on condition

I'm working on a custom "Access Control", that has to do with certain logic, rather than roles. If specific options has been set in the database, user can proceed, if not he needs to be redirect to a certain page from any place in the system,…
Nat Naydenova
  • 771
  • 2
  • 12
  • 30
1
vote
1 answer

Symfony 2.5 with FosUserBundle: Add data to the global session after Login

Our project uses the FOSUserBundle with Symfony 2.5. We need to add custom data to the user session after login, that resides in the database and is dynamic, but should be accessed in all templates and everywhere within the application. I'm thinking…
Nat Naydenova
  • 771
  • 2
  • 12
  • 30
1
vote
0 answers

Data Leak issue with moxie manager

I am using the moxie manager with tiny-mc to upload files on server.User able to upload the files but one user can able to access the files of other users on server.How can I set the privacy so that user can only access his own files.Thanks in…
mohan.gade
  • 1,095
  • 1
  • 9
  • 15
1
vote
0 answers

Use memcached with FOSOAuthServerBundle in Symfony2

I'm developing a REST API in Symfony with FOSOAuthServerBundle. I use the cache (memcache) in my repositories with createQueryBuilder. I wonder if it is possible to cache queries that are made to Table access_token whenever a request is for my…
1
vote
1 answer

Symfony API Configuration

I want to create an API to communicate with a REST Web Service. For this, I'm building this API as a library. I Just create the folder structure: ├── composer.json ├── LICENSE ├── README.md └── src └── PkgRoot └── PkgName ├──…
Victor
  • 8,309
  • 14
  • 80
  • 129
1
vote
2 answers

Symfony2 ondelete set Null

I'm new with symfony2, and I started a project of blog. This project has two entities, one of posts (Noticia) and one with comments (Comentario). I need to delete a post but I can't because of the relationship with comments. Here is my…
brander1990
  • 61
  • 1
  • 8
1 2
3
10 11