symfony

Add CSS attributes to Symfony form labels?

Hi, I try to add some css attributes to labels in my custom sfForm but I can't achieve it. In my custom class myForm extends sfForm, I create all textfields dynamically: public function configure() { $widgetFixtures = array(); foreach ($fixtures as $fixture) { $widgetFixtures[$fixture->getId()] = new sfWidgetFormInp...

Detect language and redirect to subdomain on Symfony

Hi, I'm using Symfony 1.2.7. My web is in several languages, each of one is in a subdomain like en.example.com, es.example.com. If the user enters into example.com, I want to redirect him to his language. I also want to have support staging.example.com and redirect to es.staging.example.com and en.staging.example.com so I can test every...

Symfony and Lucene search

Hello We are using sf 1.4 and doctrine. I installed Lucene according to the Jobeet tutorial. And I've been getting into some problems with it. When I do the search without any values I get the complete table that Lucene is working with. If I do a search of a value that was previously inserted into the table it returns nothing But W...

Running shell_exec() in symfony

Hi, I have a program that returns a comma-separated string of numbers after doing some background processing. I intended to run this in symfony using shell_exec; however, all I get is NULL (revealed through a var_dump(). I tried the following debugging steps. I ran the file (it's a PHP class) through a command-line lime unit test in Sy...

Symfony plugin sfDoctrineActAsTaggablePlugin not working

Hi, I want to attribute some tags to some of the objects of my doctrine model. I found sfDoctrineActAsTaggablePlugin which seems to be precisely what I need. The problem is that when I want to save a Taggable object, I get this error: Unknown record property / related component "saved_tags" on "Mishidea" Mishidea is the name of the...

Using netbeans, xdebug, symfony and phpunit together...

Hi all, I installed xdebug on my Apache and if I define a breakpoint in Netbeans, the execution breaks fine. But if I execute the tests with symfony phpunit:test-all, the execution will not break on the given break point. Any ideas? cowabunga! ...

Symfony Tasks: Getting the output of a module / action

Hi, Is it possible to capture the output of an action in a task? Ex: FooAction { executeIndexSuccess() } and in my Task: FooAction->Index Is this possible? Thanks ...

[symfony] Problem with two Doctrine request

Hello, Hello I have a little problem with requests : In an action executeFiche, I have three requests public function executeFiche(sfWebRequest $request){ // Récupération du logement correspondant à l'ID passé dans l'URL $this->forward404Unless($this->logement = Doctrine::getTable('Logement')->find(array($request->getParameter('...

Symfony: question about get and set methods of the base model classes.

Hi, if you go to a base class of the model you won't find any get or set method. It is because those methods is said are created "on the air". What does it mean exacltly, I suspect it just means they are created in the moment they are needed. Am i right? What are the advantages of the way rescpect of generate the methods inside the ...

Where does the Symfony plugin 'sfLucene' get the information about my database schema from?

A month ago I adjusted my database schema. I added a column called ordinal. I rebuilt my model and uploaded my changes. Everything works fine apart from my instance of sfLucene will not rebuild. I run symfony lucene-rebuild frontend But I get the error once it gets to the Model in question (others are fine): propel exception: unk...

How to merge two doctrine entities in the same object

Hi, In my database, the user management is divided into two tables: - One created by the symfony sfDoctrineGuard plugin (sfGuardUser), with the username, the password and other information used by the plugin - another one that I created to extend this table with more properties such as the firstname, surname etc... What I want to do is...

symfony override BaseForm class howto

I've installed the sfDoctrineGuard plugin. Everything is working, I can use the /sf_guard_user/edit/:id page to edit a user. I didn't like the way the permissions were listed as a select list, I wanted to display them as individual checkboxes split up based on the permission name. To do this I created a custom widget that extends sfWidg...

Symfony - updating unique column - validation problem

I'm new to Symfony Framework and I ran into a problem with form validation. I want to update data in DB including unique column, but if unique column is unchanged, an error is returned (An object with the same "domain" already exist."). Domain column must be unique, but user should be able to change it. So, if one user saves his domain ...

using sfGoogleAnalyticsPlugin with symfony v1.3.2/v1.4

When I try to install the sfGoogleAnalyticsPlugin, (I'm using symfony 1.3.2), I get the following error: No release available for plugin "sfGoogleAnalyticsPlugin" Does anyone know the steps required to use this plugin with symfony 1.3.2 (or 1.4) ? ...

How to extract labels from Symfony forms I18n Extract Task

Hi, I am quite aware that the extract task accepts application as a parameter, and thus one can't expect it too look into the forms folder. However, I referred the link (below) and tried a couple of ways: 1. defining my proxy __() method 2. including the I18n helper in App Configuration However, both aren't working. Can anyone tell me h...

Facultative relation with Doctrine ORM

How should be implemented facultative one-to-one relation in Doctrine ORM and Symfony? Suppose there are some folders represented in database. Each folder can have a default icon or some custom icon represented in another table. How should this relation be described in the schema file? How can I tell that in case of given folder relation...

Apply a Form Schema Formatter to all forms?

I just created a custom schema formatter by extending sfWidgetFormSchemaFormatter for my forms. However, what is sad to know is that to use it, I need to specify that in the configure() method of every form I use, which is kinda painful. Writing this in the BaseForm is a good idea, but the problem is that ModelForm & BaseModelForm don't...

Widget "password_again" does not exist.

Got this error: Widget "password_again" does not exist. I can't think why it has suddenly started appearing. I'm using the default generator file supplied with the sfDoctrineGuard plugin plugins/sfDoctrineGuardPlugin/modules/sfGuardUser/config/generator.yml generator: class: sfDoctrineGenerator param: model_class: sfGuardU...

Using a different Connection within Doctrine_Table in symfony 1.4 / sfMasterSlavePlugin

Hi all :) In my symfony project i'm working with doctrine for my data models. Also i have the sfMasterSlavePlugin installed to use different connections for different kinds of queries (writes vs. reads). Because of the small delay in mysql's replication my code is failing to fetch a freshly inserted record. To get around this problem i...

Jobeet Day 3, doctrine:data-load problem

I'm trying to load data from fixtures jobs.yaml and categories.yaml with this command: $ php symfony doctrine:data-load But the tables are empty. I have got the columns and tables created, but no data loaded. It returns: doctrine Loading data fixtures from "./jobeet/data/fixtures" doctrine Data was successfully loaded And the so...