symfony-1.4

What are the .channels and .registry folders in the symfony /plugins folder?

I am upgrading a Symfony website from 1.2.9 to 1.4.1 and having a lot of fun in the process (NOT!). I have decided to clean up all unecessary files and folders and leave things to the bear minimum, in the process - since I had acquired a lot of plugins etc over a period of time - some of which were installed by PEAR and others (mostly),...

$sf_response->addStyleSheet() dosen't work in SF 1.4 ?

Does anyone know how to add stylesheets in a template with Symfony 1.4 ? I have tried everything I can think of, from modifying frontend/config/view.yml to modifying the template itself - bothing works. I have seen from my searches, that other people have had the same problem. There seems to be a clash of sorts between using include_st...

Uploaded docx files turning into zip

I am currently using symfony 1.4 and would like to allow users to upload Microsoft Word docx files. Using the sfWidgetFormInputFile widget and sfValidatorFile below users are able to select and successfully upload their docx files using a simple web form. $this->widgetSchema['file_name'] = new sfWidgetFormInputFile(array('label' => 'Fi...

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...

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...

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...

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 ...

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...

What's the best way to pass a variable to layout.php in Symfony?

All pages of the website I'm working on will show a signin form. I'd like to display this form in layout.php so it appears everywhere. I'm not sure what's the best way to do this. Should I use a filter? I don't think using a slot is efficient since content won't change throughout the site. ...

Symfony - Is it possible to disable output escaping per module (or per template)?

I'm trying to output some HTML in an XML template and Symfony's escaping method is messing it up. So I tried making a copy of settings.yml in the module's config folder, but it seems to be completely ignored. Is there an easy way to change the escaping_strategy and/or escaping_method settings per module or even per tample? ...

Automatically getting a query instead of a result set in Symfony

In my schema, a user is related to their questions. I want to display all questions asked by a user. I also want this page to be paginated using sfDoctrinePager which requires a Doctrine_Query as a parameter. I know I can call $my_user->getQuestions() to get all questions from my_user, but is there a way to get the query to get all th...

Symfony route url (variable joined to a literal)

I'd like to generate an URL like this one: /MyCategory/MySubCategory/page2.html I have tried to do it this way: my_route: url: /:variable1/:variable2/literal:variable3.html But Symfony outputs this: /MyCategory/MySubCategory/page:variable3.html I'm using Symfony 1.4.1 How could I solve this? ...

How to set default value to a extra field in a symfony form

What i need to do is customize my default userForm by adding a 'passwordagain' field and set the value to the new field equal to the 'password' field. My code: class UserForm extends BaseUserForm { public function configure() { $this->widgetSchema['password'] = new sfWidgetFormInputPassword(); $this->widgetSchema['passwordagain'] = n...

Ignore duplicates when using INSERT in a Database with Symfony and Doctrine

I have a table CREATE TABLE `sob_tags_articles` ( `tag_id` int(11) NOT NULL, `article_id` int(11) NOT NULL, `id` int(11) NOT NULL auto_increment, PRIMARY KEY (`id`) ) ENGINE=MyISAM AUTO_INCREMENT=112 And triing to save an object with Doctrine: $sbTagsArticles = new SobTagsArticles(); $sbTagsArticles->article_id = $pubId; $sb...

In Symfony with the Doctrine ORM how do you default autoincrement columns to integer and not bigint?

It seems that in Symfony 1.4 with Doctrine that when generating auto-increment columns (id) it defaults to bigint. This seems like total overkill and I would just like to default it to an integer instead. The following produces a primary key column named id that is a bigint JobeetCategory: actAs: { Timestampable: ~ } columns: ...

how to load different frontend modules templates in backend for cutomizing templates contents using symfony 1.4,doctrine

how to load different frontend modules templates in backend for cutomizing templates contents I have class module in frontend & also templates as well. I have also created a module in backend as emailcontent for accesing several modules templates to customize html. 1. How do i access/Load templates in backend module emailcontent ...

How to "order by" a sfWidgetFormDoctrineChoice in the Admin Generator

I'm using Symfony 1.4 and Doctrine. Let's say I have 2 classes : a Brand and a Product. When I create a new product in the Admin Generator based admin, I'd like to choose a brand from a dropdown list. The Admin Generator is doing that for me, automatically creating a sfWidgetFormDoctrineChoice. The problem is that the brands are order...