symfony

One to two relationship in Doctrine with YAML

I'm working on my first Symfony project with Doctrine, and I've run into a hitch. I'm trying to express a game with two players. The relationship I want to have is PlayerOne and PlayerTwo each being keyed to an ID in the Users table. This is part of what I've got so far: Game: actAs: { Timestampable:- } columns: id: { type: i...

symfony autocompletion in netbeans?

im using netbeans to code a web application with symfony. it seems that netbeans doesnt support symfony in auto completion. could one fix this problem. cause i want to be able to click on symfony's functions and get to the source, eg helper function and model methods and classes. ...

Symfony: using $this->widgetSchema->setFormFormatterName('list')

Hi, im using $this->widgetSchema->setFormFormatterName('list'); this way below to render my form as a list but it is still a table. Any idea? public function configure() { parent::configure(); $this->widgetSchema->setFormFormatterName('list'); } } Any idea? Javi ...

Symfony Doctrine Nested Set Path To Root Query

Is there a way in symfony to get from a doctrine nested set the whole path/route from a specified by id element to the root element in a Doctrine_Collection or array ? ...

Symfony on virtual host (document root problem)

Hello, I'm developing an application in Symfony and on localhost (XAMPP) I want to simulate the same conditions as on the webserver. The web server is configured as follows: /www => mydomain.com /foo => foo.mydomain.com /bar => bar.mydomain.com ... I'm going to put my Symfony application into /www direcotry so there'll be: /ww...

sfFormLanguage displaying languages in their respective language

Is there a way to display languages using sfFormLanguage, but in their respective language? I mean, instead of this: English, French, Spanish I want this: English, Français, Español ...

Using jQuery to POST a Symfony form

I am using jQuery in conjunction with Symfony 1.3.2. I have registered the form's submit button click event with jQuery, so that jQuery POSTs to the correct action at the server. My code looks like this: $(document).ready(function(){ $('#form_btn').click(function(){ $.ajax( {'type': 'POST', 'url': '/form_handler.php' }); }); ...

Selecting multiple items by default in sfWidgetFormDoctrineChoice (symfony)

Using Symfony and Doctrine, I have a multi-select list box. The multiple default values need to be generated based on a Doctrine query. $this->setWidgets(array( 'folders' => new sfWidgetFormDoctrineChoice(array( 'model' => 'FolderItem', 'order_by' => array('name', 'asc'), 'multiple' => true, 'query' => FolderItemTable...

In Symfony 1.2 how can I get the current database name from the database.yml file in Propel?

I have a raw sql query I need to run, but the database name changes in each environment (live: db, dev db_test) I need to get the current database name from the databases.yml file. How can I get just the current database name? I am using the Propel ORM ...

How to diganose an unlogged Error 500 on Apache?

We are running a very simple Symfony script, that randomly returns an Error 500. The system administrator says he can't find any trace of an Error 500 on the error logs, however using Curl or Firebug, it is obvious that an Error 500 is being returned. The script simply parses a POST request submitted to an URL on our server. We already...

Password Hash Implementation

I am developing a new application using Symfony. I want to store the passwords hashed, so I overridded the save method in my User model: public function save(Doctrine_Connection $conn = null) { $this->setUserPassword( md5($this->getUserPassword()) ); return parent::save($conn); } This works good when a new user created. However, t...

Using symfony with postgresql

I am trying to create a website using Symfony and PostgreSQL. I cant find any documentation that shows how to do this. All the documentation assumes the backend db is mySQL. Anyone knows how to do this? ...

symfony validation problem

im testing symfony form validation. the problem is very simple. no matter what i put in the body text area and post it, i keep getting "Required" back. i dont know why. i just have one validation rule. here is the code: code what is wrong/how can i debug? thanks UPDATE: it has something to do with the binding in the controller. ...

Symfony: Web debug toolbar icons disappeared

Hi, Just moved a symfony project from local (win) to server (linux), and the icons in the web debug toolbar have disappeared. Only the image alts remain so I guess it's a path issue with the images. Basically, I see "Time 300ms" instead of "[icon] 300ms" for each of the items. I'm a little worried that some other paths aren't broken as...

Edit primary keys in Symfony auto-generated admin

I need to edit primary keys in several tables. By default, symfony hides primary keys in New/Edit forms. For example, can't edit table 'Tags' with only field 'tag' which is PK. Adding integer ID to this table is not exactly good db design. Thanks in advance for your help. ...

why use admin panel instead of phpmyadmin for CRUD?

in some frameworks (symfony) you can generate an admin panel for CRUD operations. i wonder why i should use that one and not doing CRUD directly in phpmyadmin? what are the benefits with an admin panel? thanks ...

Reference another route in your routing.yml in Symfony ?

Developping a plugin, I have a routing.yml in my plugin dir, specifying a route with sfPropelRoute. in my plugins/myPlugin/config/routing.yml : myplugin_test: url: /myurl/:id class: sfPropelRoute options: { model: myClass, type: object, method_for_criteria: selectAvailableObj } params: { module: mymodule, action: show } r...

no autocompletion for symfony getTable() function?

if i use Doctrine_Core::getTable('User')-> i will have no auto completion. isnt it better to just use User:: for autocompletion? and of course i have to define the methods static what is the benefit with using getTable except that i can use a non static method? ...

Pass a variable to a Symfony Form

Hi, I am building a web application using Symfony 1.4 and Doctrine for a school and I want to make a very simple form to add a course to a student. The main problem I have is that in the drop down list I only want to show the courses in which the student is currently not enrolled. I already have a function in the model (in Student.cla...

jquery ui datepicker is huge

Hi, im trying to add a datepicker to my symfony application and i got it working, but the size of the datepicker is about 3 times bigger than normal (on the demo page). I have not edited any CSS, i just used the default ui lightness theme no modifications. Does anybody have any idea why the size is blown up so big? CSS: http://paste2...