symfony

sfValidatorAnd fails when saving a i18n object

Hi, I'm using Symfony 1.2 with Doctrine. I have an object with the i18n behaviour. If I have the following validators, it fails when saving the form with error "SQLSTATE[23000]: Integrity constraint violation: 1048 Column 'id' cannot be null" (it tries to save the object_translation before saving the object) $this->validatorSchema['pho...

Symfony file upload - "Array" stored in database instead of the actual filename

I'm using Symfony 1.4.4 and Doctrine and I need to upload an image on the server. I've done that hundreds of times without any problem but this time something weird happens : instead of the filename being stored in the database, I find the string "Array". Here's what I'm doing: In my Form: $this->useFields(array('filename')); $this->...

Comparing route to current request in Symfony

For my site navigation I'd like to indicate the current page. If each page in the navigation has its own route is there a way to see if the current request matches the route? Something like: $request->getRoute() == '@my_route' Or, more generally, is there an idiomatic way of setting the active page when creating site navigation in Symf...

What steps should I take for describing the architecture before starting Web project ?

I am working on the project that is based on symfony (doctrine) with use of a facebook api. I really want to get the description of architecture of in terms of some diagrams, so What steps(in terms of types of diagrams) should I take first before coding ? ...

Symfony custom route works with frontend_dev.php but not with index.php

Am I missing something or should my custom route work with the index.php (or nothing) instead of frontend_dev.php? I'm getting a 500 error when I go to the model, and a 404 for the show page. My route is: project_show: url: /project/:slug class: sfDoctrineRoute options: { model: Project, type: object } param: { module: p...

sfDoctrineGuard - how to ALWAYS join sfGuardProfile to sfGuardUser

I want to make it so that anytime the db is queried for an sfGuardUserProfile it is autmoatically joined and hydrated with its related sfGuardUser. If i was using Propel 1.2 i would normally override the doSelectStmt method of the sfGuardUserProfilePeer class to inspect the Criteria and modify it as necessary as well as modifying the hy...

Outputting an HTML entity character from a helper function

I am using Symfony 1.3.2 on Ubuntu. I have written a little helper function (statsfoo) that prints out summary statistics about an item. I am using the helper function in my template like this: // In StatsHelper.php <?php function statsfoo($some_param) { return "<div class=\"sfoo\">&9830; the stats number for item is 42</div>" } //...

Symfony forms: how to set default value for a textarea widget

I am using Symfony 1.3.2 on Ubuntu 9.10 I want to set the default value of a textarea widget, with data read froma adb. My code snippet in the template looks likes this: <?php $form['notes']->render(); ?> The API docs dont show how to do this - does anyone know how to do this? ...

symfony 2.0 stable enough to use?

i wonder if symfony 2.0 is stable enough to use? cause i never used symfony before. it seems that symfony 2 is much more better than the previous version and i dont want to relearn/recode everything some months from now. when do you think symfony 2.0 will be released? will it be a wise choice to use 2.0 now? ...

how long will it take to start coding with symfony?

i wonder how long it will take to master Symfony and use it to code? i already know mvc + oop and have used CodeIgniter before to code. are we talking about days, weeks or months giving that i will dedicate 8-12 hours a day to learn it. ...

How to document a Symfony based REST API (similar to enunciate's documentation capabilities)

If I have a REST based service written in the Symfony [symfony-project.org] framework (i.e. PHP), is there any decent tools/frameworks out there that will parse my code and generate API documentation? The Java based framework enunciate has documentation capabilities similar to what I need, you can view an example of this here: http://en...

[Symfony] Login to application with GET/POST token

I work on a Symfony web application which has a standard login form. To allow users to login more easily we want to give them a link which logs them in directly. I've already build a way to get a token to use, but I have no clue as to how the Symfony login process works, specifically how I can adapt it to take a GET/POST token instead of...

learning symfony 1.4 will be good when using symfony 2.0?

i know that the architecture is different in symfony 2.0 but im learning 1.4 right now. i wonder if this knowledge i gain about 1.4 will be usable for 2.0 in some extent or will it be a total waste of time? thanks ...

Symfony forms: Is there any way to set default date for created_at and updated_at field

Hi all, I have a symfony form which have created_at and updated_at field for date. But I want to populate this field with default value and not shown when the form shows. So that, the created_at will hold the current time when inserting new data and updated_at will hold current date when updating any data. Did anyone do something like th...

Subquery Doctrine Couldn't find class

I'm trying to create a query like this one : $q = Doctrine_Query::create() ->select('p.nombre') ->addSelect('(select count(*) from alojamiento a left join localidad l on a.localidad_id=l.id where p.id=l.provincia_id and a.activo=true)') ->from('provinc...

solr plugin for symfony?

with symfony using doctrine is very easy cause its fully integrated into the framework. i wonder if there is a possibility to integrate solr with symfony too (eg, via plugin?) thanks ...

Symfony 1.3: different form filters generated

Hi, i have this class in rs1/lib/filter/doctrine/FelizFormFilter.class.php <?php /** * Feliz filter form. * * @package rs * @subpackage filter * @author Your name here * @version SVN: $Id: sfDoctrineFormFilterTemplate.php 23810 2009-11-12 11:07:44Z Kris.Wallsmith $ */ class FelizFormFilter extends BaseFelizForm...

Selecting a date range where date is not null with Propel

Using Propel I would like to find records which have a date field which is not null and also between a specific range. N.B. Unfortunately, as this is part of a larger query, I cannot utilise a custom SQL query here. For example: I may have records like this: --------------------- | ID | DUE_DATE | --------------------- | 1 | NUL...

Symfony Rewrite rules on Zeus webserver

I would like to run a symfony project on a zeus webserver, however i cannot get the rewrite rules to work. Has anyone done this successfully The symfony .htaccess is as follows: Options +FollowSymLinks +ExecCGI <IfModule mod_rewrite.c> RewriteEngine On # uncomment the following line, if you are having trouble # getting no_script...

ExtJs and Symfony - Your Experiences

Hi all, Not so much of a question as such but I am about to start a project using Extjs (www.extjs.com) and Symfony (www.symfony-project.org). I would like to know about your experiences. I.e. any hurdles you had to overcome, any technical triumphs. Practices you implemented to make development with both of the frameworks easier, usef...