symfony

Zend vs Symfony development time

Is it faster to develop using the Zend Framework or Symfony? ...

How to implement Symfony Partials or Components in Django?

I've been developing in the Symfony framework for quite a time, but now I have to work with Django and I'm having problems with doing something like a "component" or "partial" in Symfony. That said, here is my goal: I have a webpage with lots of small widgets, all these need their logic - located in a "views.py" I guess. But, how do I...

Symfony: Model Translation + Nested Set

Hi, I'm using Symfony 1.2 with Doctrine. I have a Place model with translations in two languages. This Place model has also a nested set behaviour. I'm having problems now creating a new place that belongs to another node. I've tried two options but both of them fail: 1 option $this->mergeForm(new PlaceTranslationForm($this->obje...

edit profile from frontend - symfony

hello, I succeeded to create a register form, and now users can register my site. But I can't create a form where users can edit their profile. I have sf_guard_user and sf_guard_user_profile in my schema.yml Does someone have an article about how to do that ? I tried few ideas without success. ...

How can I clean up Symfony admin routes?

My backend URLs look like this: mysite.com/backend.php/blog I'd like to change it to: mysite.com/backend/blog Technically this isn't limited to admin apps, as Symfony grants every application two front controller scripts. But I hate having the script name in URLs and as such I'd like to change it. Is this possible? Thanks in ad...

Propel NestedSet creating Balanced Tree

Hi folks, I'm trying to use Propel's NestedSet feature. However, I'm missing something about inserting such that the tree is balanced as it is created (i.e. fill it in horizontally). Say I have these elements: root r1c1 r1c2 r2c1 r2c2 I want to insert r2c3 as the 1st child of r1c2 (i.e. fill row 2 before starting on r...

Symfony - admin - FormFilter - is empty - i18n

Hi, we are in admin generator in filters in field. What is the most clearest way to translate is empty label under form fields? I've solve it by own setWidgets and setWidgets in BaseFormFilterDoctrine witch extend the parent methods by translating that is empty( empty_label ). setWidgets - translate all *empty_label*s in form filter(...

edit profile from frontend - symfony

hello, I have a website in symfony framework I have a table sfGuardUserProfile in schema.yml, and registeration form seems to work fine. Now i want users can edit their profile how can I do that ? thanks! ...

How to unit-test an enterprise symfony project?

I´m working on a huge project at my work. We have about 200 database tables, accordingly a huge number of Models, Actions and so on. How should I begin to write tests for this? My biggest problem is, with symfony you can test with the lime framework, which is great. But most of the code writes, deletes or do other things with the dat...

Problem with Symfony routing with online project

I have a Symfony project on a Win XP / IIS 7 machine with Isapi rewrite installed. When I go to the frontend (my main) application, it seems that the routing simply doesn't work. I always end up on my default module/action. However, if I turn no_script_name = off (in the app's settings.yml file) then everything works fine. I also have an...

To create check box in symfony using widgets and also validate it?

the code in symfony that i am using, $this->setWidgets(array( 'mobile' =>new sfWidgetFormInput(), 'subscribetosms' =>new sfWidgetFormInputCheckbox(), )); i want to validate the checkbox, and also code to take values from check box ...

Which validator should be used to implement login in Symfony?

Currently, my login form looks like this, class LoginForm extends BaseFormPropel { public function setup() { $this->setWidgets(array( 'login_id' => new sfWidgetFormInput(), 'pwd' => new sfWidgetFormInputPassword() )); $this->widgetSchema->setLabels(array( 'login_id'=>'Login Id', 'pwd'=>'Password'...

What's the best way to include custom HTML in a Symfony form?

I'm working with a Symfony generated admin and need to include some custom HTML into a form. This HTML (a label, img tag, and link) should only appear when the action is 'edit'. What's the best way to do this? It seems like I should just be able to include a partial, but I don't know where to include it from. Thanks. ...

To show custom message in Symfony forms?

Want to show a custom message in form's error list, if the two fields did not match. the from is as follows, 'old_password' =>'Old Password*', 'new_password' =>'New Password*', 'confirm_password' =>'Confirm Password*', I want that the old password should match the value from the database, the value in new ...

How to use Sessions in Symfony?

like in classic PHP we use the magic variables to start,create session, so how to do that in Symfony. ...

Set default values in Select option in Symfony?

I am using the widget sfWidgetFormChoice(array ( 'choices' => CountryPeer::getAllCountry(), )) and validator as sfValidatorChoice(array ( 'choices' => array_keys(CountryPeer::getAllCountry()), )) I get a select element as <select id="country" name="reg_form[country]"> <option value="1">India</option> <option value="2">S...

Loader.php trying to load Doctrine classes, but we use Propel!

We are finding cases where we get the following 500 error: File xyz.php does not exist or class "xyz" was not found in the file at () in SF_ROOT_DIR/lib/vendor/Zend/Loader.php line 107 ... where xyz == Memcache (when trying to use symfony cc on the command line) or sfDoctrineAdminGenerator (when using an old-ish AdminGenerator-g...

Symfony cache is breaking my flash messages

Flash messages in Symfony projects give feedback to website users after an action is performed. They usually only show for one page load after the action is triggered. Unfortunately, when caching is turned on my messages fail to appear and only the cached version of the page is returned. In one instance a version of a page with a mes...

Which is the best book for learning Symfony?

Apress The Definitive Guide To Symfony Symfony Book Or Some Other Book. ...

sfEasyGMapPlugin won't show the Google Map.

Hi everyone. I've just started to use the sfEasyGMapPlugin, in my Symfony website. So I've followed the samples and created a basic map, to check if it works. In the action : $this->gMap = new GMap(); $this->gMap->setCenter(50.637551,3.062725); And in the template : <?php use_helper('Javascript','GMap') ?> <?php include_map($gMap,...