155 questions
-3
votes
1
answer
322
views
Avoid two or more login with the same user at a time using FOSUserBundle
I'm trying to avoid two or more login with the same user at a time using FOSUserBundle in Symfony 2.4, I don't know how to access to info related to authenticated users and how to logout if the user ...
0
votes
1
answer
709
views
Create File shortcut with Symfony2 FileSystem
Anyone know how to use the Filesystem component Symfony2 to create shortcut files? Or another way to create a file shortcut?
2
votes
1
answer
116
views
How to get data from a form who using method GET
I have a problem with my form. I tried to get the value from form but no result. My form is:
<form action="{{ path('show_product_category',{ 'id':category.getId(), 'name':category.getCategoryLink()...
2
votes
0
answers
248
views
symfony 2 Set remember me on post auto login on registration
I am using Symfony 2.4. After a user registers I need to log him in and automatically and also have the remember me functionality enabled as well along with it.
at the moment to login I use the ...
1
vote
1
answer
113
views
Symfony2 version switch [duplicate]
Can I somehow detect inside the code which version of symfony is currently used? I have a bundle which uses a symfony function that has changed in version 2.4 so I need to detect on which version I ...
4
votes
2
answers
2k
views
How can I increase session lifetime in Symfony2?
I have set the gc_maxlifetime in my config.yml file to 300. But its not working. Symfony2 still takes the value set in php.ini
Symfony version is 2.4.4
2
votes
2
answers
1k
views
SYmfony2 request can't get the post variable
I'm trying to get the variable of a POST request in a symfony 2.4 controller. I usually have no issues on that but for this one...
this is how I call the controller:
var deferred = $q.defer();
$...
3
votes
2
answers
2k
views
Access global parameters from route condition expressions in Symfony
I'm trying to access app-wide symfony parameters (defined in app/config/parameters.yml) from an expression in a route condition (documentation).
I tried my luck inserting the parameter within ...
0
votes
2
answers
478
views
How to get environment in custom route loader in Symfony2?
I've created a custom loader for my bundle with the purpose of loading different routes per environment. My loader class looks like this:
class ApiRouteLoader extends Loader
{
public function ...
0
votes
1
answer
540
views
Customizing Symfony form label based on targeted field type
I am trying to customize Symfony form label to add an asterisk(*) for all required fields through this Symfony doc. But my asterisk <span has to be inside the <label tag so I had to customize ...
1
vote
1
answer
1k
views
How to set remember me cookie when logging user inside Controller in Symfony2
I have made my own custom FB login function because I need a certain flow that I couldn't achieve with HWIOAuthBundle. Everything works great, except one thing... I don't know how to set remember me ...
0
votes
3
answers
324
views
How to limit down queries from doctrine using Join in symfony2
I'm having troubles getting related entities in a single query.I used both fetch=Eager and manual query with join.Here are my entities
----------------------Store.php-----------------------------...
1
vote
0
answers
242
views
Validating a Custom Form with multiple validators in Symfony 2.5
I have an unbound form with two fields that i would like to validate. I would like to use the built in NotBlank on both fields and my two custom validators MyFile and *UploadConstraints *. The ...
12
votes
1
answer
3k
views
How to log an entity that has collections?
I want to log all changes of an entity. I looked into Loggable doctrine extension as provided by the StofDoctrineExtensionsBundle.
I got it working for fields that store simple data, e.g. string and ...
4
votes
2
answers
3k
views
How to load Symfony2 fixtures from migration class?
We've built up a set of data fixtures to seed the database with all our reference values. We are also using the DoctrineMigrationsBundle to manage schema updates. We would like to trigger the ...
0
votes
1
answer
101
views
Confirmation for new registered users seems to be not working on my development
I'm overwriting registerAction() with my own logic as follow:
public function saveAction(Request $request)
{
$em = $this->getDoctrine()->getManager();
/** @var $userManager \FOS\...
0
votes
3
answers
753
views
addRole using userManager doesn't work
I'm trying to add roles to user when they are registering in this way:
$em = $this->getDoctrine()->getManager();
$userManager = $this->container->get('fos_user.user_manager');
$user = $...
14
votes
2
answers
26k
views
Twig: set a variable inside a loop, use it outside that loop
I'm trying to define driverid, using set, as a var in for driver in assigned.driver cycle for use later. See below what I'm doing:
{% for key, assigned in pgn %}
<tr id="device-{{ assigned.id }...
0
votes
1
answer
3k
views
Angularjs + Symfony2 routing can't make it work
I've been learning AngularJS and I'd like to integrate it with my SF2 back end.
I'm getting confuse with the routes let's see what I have:
When we go onto /usermanager the symfony routing system ...
0
votes
2
answers
1k
views
Extending all controller classes from my custom controller class in symfony2
Like in Codeigniter we do have 'core' folder where we can define our own controller like 'MY_Controller' and can be used to extend all the class to extend from this controller is there any possibility ...
0
votes
1
answer
1k
views
How insert data form select fileds in symfony2.4
I have the next form type in my symfony2.4 project, I use doctrine ORM
<?php
namespace TFS\RiseBundle\Form\Type;
use Symfony\Component\Form\AbstractType;
use Symfony\Component\Form\...
1
vote
1
answer
19
views
KunstmaanBundleStandartEdition with GedmoBundle DataFixtures error
I'm using Symfony 2.4 with these two bundles. Problem is, that about 1 month ago it works both. Now it causes an exception during loading DataFixtures. It happens, that Doctrine ORM use UPDATE instead ...
0
votes
1
answer
418
views
Symfony UserPassword validation in ajax form
I have a problem validating User Password in Symfony 2.4.
I have a form created with html code inside twig and i am not using form builder because i am submitting the form via ajax.
The form is a ...
4
votes
1
answer
2k
views
Right way to use external non PSR-0 libraries on Symfony2 project
I'm working on a application that will connect to Intuit Quickbooks API trough theirs REST PHP SDK. In basic PHP I have things working without problem since I load files as follow:
require_once('../...
0
votes
2
answers
773
views
Failed to start the session: already started by PHP ($_SESSION is set) for facebook PHP SDK
I'm implementing facebook app in symfony. I used facebook php SDK
When I call
$me=$facebook->api("/me");
if(isset($me['id']))
$response=$facebook->api("/".$me['id']."/...