symfony

Where can i find more documentation / tutorials about Symfony?

I'm using Symfony for a month now, and I think it's great, but there certainly is a lack of documentation on some parts of the framework (the admin generator for example). The basic documentation (Jobeet, More with Symfony, and so on) is great and allows you to develop a basic website in no time. But: I'm using Symfony 1.4 and Doctri...

Symfony, netbeans 6.8 and debugging a web page

I am using Symfony (1.31) - with Propel ORM to build a website. I have recently moved from using a text editor, to Netbeans (6.8) as my dev environment. Coming from a compiled language (C++) background, I am used to setting break points in code etc as part of debugging. Web development I have encountered (atleast with PHP), has been lar...

Problem with Symfony form validation

Hi, I'm unable to see what I may be doing wrong with the following Symfony 1.4 form validation. Basically, all I just want is for all four conditions to be taken correctly into account (required, min-length, max-length, regular expression). It actually WORKS, but for the 'required' condition it fails to display my custom error message a...

Removing default routing in symfony causes internal server error.

Error Message: The route "default" does not exist. Yes, it doesn't exist. But as described in the Doctrine version of "Practical Symfony | Day 5" everything should work well when default routing is removed, because all actions of the job module has been successfully routed by other routers. I get the error when I request the URL below...

Symfony i18n table: Ways to get fallback default value?

Hi, I'm building a city names table in MySQL with about 10K rows to be a Symfony i18n table. Basically, the default culture is en_US and every city in the table is initially of this culture. Over time, I'd like to add to the table only those cities that might have an alternative name in a different language, such as "London (en_US) / Lo...

Should you validate in the Model? (Symfony based question, but related to general MVC)

Hi, This is a quick question relating to Symfony, but could be a general MVC question. I have a class in my model, for example, WebUser. This class has a property of email_address. This value must be unique to each WebUser. Now, I've made it so all my Symfony forms validate that the email_address is unique for the given WebUser, howev...

Generating pdf file using symfony framework

I'm using Symfony 1.4 and I have to create pdf file from Word/HTML with some fields added by user using form. I've met this problem in plain php few years ago, but I wonder if there is any ready solution in Symfony framework? Or someone wants to share his idea about this... ...

How do I retain the Original Filename After upload in Symfony

I am using Symfony 1.4. Users from the backend application can upload files and publish them to the frontend. Using sfWidgetFormInputFile and sfValidatorFile, I would like to keep the original filename instead of the default functionality of a random string (i.e. Meaningful_filename.docx instead of a4b25e9f48cfb6268f34b691fc18cd76fefe...

Calling symfony helper from a php script needed for Ajax?

N00b question: I'm using Symfony with Doctrine. I have a form where I've added a little Jquery & Ajax check of whether a username that has been inputted into the form already exists. The jQuery calls a short PHP script on my web root that does the MySQL database check and returns true/false, which is then used to determine what error me...

How to format a getUpdatedAt() kind of date in Symfony?

I'd like to change the formatting of a date in Symfony 1.4 The default one being: <?php echo $question->getUpdatedAt(); // Returns 2010-01-26 16:23:53 ?> I'd like my date to be formatted like so: 26/01/2010 - 16h23 I tried using the format_date helper DateHelper class. Unfortunately the API is rather empty (something really needs ...

symfony proper initialization of database connection

I use the following code to make Propel 1.4 works in a php file. what should i do to make sure DatabaseManager delete correctly after its work? shutdown at the end of the php file?? what will happen if there are multiple accesses to the same php file at the same time? <?php require_once(dirname(__FILE__).'/../config/ProjectConfigura...

Doctrine ORM - Self join without any real relation

I'm trying to find related objects to one object by matching the objects tags. I've constructed a mysql query which will return the objects that match the most by counting the matching tags. I'm new to doctrine (1.2) so I'm wondering if someone could help me to get on the right track modifying my schema and creating a DQL query? The bi...

How to configure Apache to have two symfony projects in the same domain (without using subdomains)?

Hi! I'm trying to configure Apache to have to different symfony projects (each with his own installation of the framework) under the same domain, but I can't get it to work using folders. This is what I would like to have: mydomain.com/projectone/ mydomain.com/projecttwo/ I can make it work using subdomains, but is not the preferre...

How to implement a helper in Symfony 1.4?

I'd like to create my own helper but can't find any help on Google for Symfony 1.4/Doctrine. I guess it has something to do with creating a myClassHelper.class.php in lib/helpers/ or something, but I don't know what to implement, or if specific methods have to be overridden. Any help would be appreciated! ...

Symfony: extra field to a form not saved.

OK, I have one form with another embedded form. In actions.php I have: ... // add extra field - select for dynamic population $tempFrm = new SbCarteOpTempForm(array(), array('type' => 'transfer')); $tempFrm->setWidget('inv_selectate',new sfWidgetFormSelectMany(array('choices' => array()))); $tempFrm->setValidator('inv_selectate', new sf...

Create a new delete object_action in Symfony 1.4's admin generator

I'm using Symfony 1.4/Doctrine's admin generator. There's a list of questions and I'd like to be able perform a custom object_action on each of them. What I'm looking for is to mimic the _delete object action but doing some calculation before that. So I created a new action : public function executeListDeleteAndRecalculate(sfWebre...

Doctrine override relation accessor

Hi everybody, I'm using Symfony 1.4 + Doctrine 1.1. I have a schema with a one-to-many relation. Let's say A has many B, I ask for all the B's of A as follow: $a->b This returns a Doctrine_Collection. What I want its a way to tell doctrine to give me all the B's of A sorted by a particular attribute of B. I don't want to re-write th...

Configuration problem in my production server in symfony...

Well, i have a shared host and i have'nt ssh access. The problem is the server structure and symfony estructure... Server has this estructure error/ log/ ... web/ and in web dir we can load web aplication... symnfony structure is.. app/ .. web/ well the problem is that with my domain, if i try to access i have to put www.domainname....

How can escaping be used to prevent XSS attacks?

To prevent XSS attacks, output escaping has been enabled; The above is from symfony,but I don't understand. ...

Symfony (Propel) Admin Generator Behavior - Why does it work like this?

Hi there, I've been having some 'issues' with the admin generator (Propel version). The HTML generation behavior between the list view and the form view is very different, and I'd like to know why, as the form view works better (and as expected) compared to the list view. I have the following YAML for the 'edit' action, edit: action...