symfony

how to translate this query into Criteria ??

Hi, I try to translate this query into Criteria (with Propel), but without success. Can you help me please ? SELECT DISTINCT (email) FROM user, travail WHERE travail.id_user = user.id_user AND id_site = "1" AND `droits` = "1" This my Criteria query : $c = new Criteria(); $c->add(self::DROITS, 1, Criteria::EQUAL); $c->add(Trav...

Autoloading module level classes and config files in symfony.

Hi, there everybody. I am trying to auto-load classes from the "lib" directory inside of one specific module directory. I have tried everything but to no avail... One of the classes I would like to load is a class called visUser which inherits from myUser I have already made a factory.yml file in myapplication/modules/mymodule/conf bu...

How do I call use_javascript after include_javascripts has been called?

In my layout, I'm calling include_javascripts() in my <head></head> section. Later on in my layout, I'm calling a component which makes use of use_javascript(), but, unfortunately, the javascript has been output, so this request falls on deaf ears. I can think of a few approaches: Put the call to `include_javascripts()` at the bottom....

Symfony variable passing from action to view

Hello I have the following proble: I have the action class of a view in Symfony, action.class.php, in there i have this code: foreach ($images as $i => $img) { if (strstr($request->getFileType($img), 'image')) { $enter = true; $name = Util::processImages($request, $img, 'app_uploads_temp_dir'); if ($name != '') ...

IF statement in Propel select criteria

Hi everyone, I am trying to incorporate an IF statement into my propel criteria. This is the how I build up my criteria: $c = is_object($c) ? $c : new Criteria(); $c->addSelectColumn("CONCAT(DAYOFYEAR(" . SomePeer::CREATED_AT . "), ' ', YEAR(" . SomePeer::CREATED_AT . ")) AS period"); $c->addSelectColumn("COUNT(" . SomePeer::ID . ") AS...

Symfony Doctrine migrations : removeIndex not working

I'm using Symfony 1.4 with Doctrine. Here's my initial schema: Page: tableName: page columns: ref: type: string(50) notnull: true unique: true I'd like to remove the index on the ref column using migrations. So the schema becomes: Page: tableName: page columns: ref: type: string(50) notn...

The fastest best language to develop a fully featured web app.

Hi, I consider myself as skilled programmer and know a large number of languages. Eg Fortran, C, Ruby, Python, PHP, VB, Obj-C, C# etc. I want to build a fully featured piece of Web Based software that would have the following modules. 1. Calendaring System for managing bookings. 2. Record keeping and notes system to record details abou...

How do I embed sfDoctrineGuardPlugin register/signup form into my homepage module template?

So far I have copied sfGuardRegister into my frontend app modules directory so it has taken over the default sfGuardRegister located in the sfDoctrineGuardPlugin directory in the symfony plugins directory. I want to have the plugins sfGuardRegister signup/register form show up on my homepage template.. Thanks in advance ...

Autoloading Symfony classes in Zend_Framework

Hello, How to autoload Symfony classes in the app based on Zend Framework? Can I push some kind of Symfony autoloader to the Zend's Autoloader? I need to use some of the components like output escaper or dependency injection classes. ...

Symfony doctrine:generate-module custom theme: cannot find templates for i18n embedded field

I generated a custom theme by copying plugins/sfDoctrinePlugin/data/generator/sfDoctrineModule/default" into plugins/sfDoctrinePlugin/data/generator/sfDoctrineModule/mytheme1" I changed the templates to match my needs (no tables, custom errors display and so on). ./symfony doctrine:generate-module --theme=mytheme1 frontend user...

Help installing Symfony plugin

Hello can somebody write or point to a good symfony plugin installation tutorial. Here is the problem, I have a symfony 1.2 application and I'm trying to install the LightWindow plugin, which run on Prototype. The thing is: I dont have PEAR installed, and due to proxy limitations I don't think I can, but there is a way to install symfon...

symfony 1.4: adding defailt value to a model

I'd like to add some default values to a model when I'm creating a new entry (like a timestamp) I'm sure there are more than one way of doing this, I'm curious what the different ways are, but mostly what the standard way of doing this is. Thanks ---edit--- solution: for the timestamp the default would be default: CURRENT_TIMESTAM...

symfony 1.4: recreating the database from new schema

I'm trying to recreate the database from a new schema, but I keep getting the same error Invalid default value for ... I've changed the schema.yml so many times even removed the value that is causing this error, but it still shows. I'm still getting the same error no matter what I do. I use php symfony doctrine:build --all --and-load bu...

Symfony : Single view for multiple models

Hi, I am developing a project in symfony. In my DB I have a set of models (tables) for each geography. Each set of models is presented to user in same way. So, the view should be same for each geography. I want to have single view for each set of models. So, is it possible to dynamically associate a model to a request based on the co...

Symfony problem when need to save file before saving an Entity

I have an Entity on Symfony that has also a file "attached" to it. I want to save the file with the id of the created Entity. The problem is, that I will know the Entity's ID only after doing "dosave()" on that Entity form. Is there any way to save the file after doing the "dosave()" but still write the code as an override for the Ent...

Symfony framework: Server returns error 500 to me, and I have no clue what is wrong

Hello there, I am going through the Jobeet tutorial for symfony newbies. The server returns err 500 when I try and access http://localhost:8080/frontend_dev.php/job. As far as I can tell there is nowhere where I can read what the problem is in any log. And when I try and access job, symfony doesnt display a panel at the top to help me ...

PEAR Package for Symfony Plugin on Windows

I have been looking for a way to create a PEAR package out of my Symfony plugin on Windows. I am unable to find any utility or tutorial explaining the process. In case there is no solution, I will have to manually prepare my package.xml, which is kind of sad in this world of automation. Any solution? ...

Alternative ways to get Table-instance in doctrine

In some circumstances Doctrine_Core::getTable('%Name%') returns Doctrine_Table instance instead of %Name%Table one. It's obviously a bug, but are there other ways of getting Table-instances in doctrine besides Doctrine_Core::getTable('%Name%') ? In order to give a demonstration of this improper behavior : here is schema of small issue t...

symfony sfGuard Unknown record property / related component "sf_guard_user" on "sfGuardUserProfile"

Hello: I'm getting this error when I'm trying to implement this code. The first code block with $user seems to work as the database is updated, but the second part fails. This is the error: Unknown record property / related component “sf_guard_user” on “sfGuardUserProfile” public function executeCreateAccount() { $user = new sfGu...

Symfony Update a Model Schema

So heres the scenario: Currently we have a development site with 3 models. We found we didn't like our initial schema and added a few rows. We re-generated the schema (doctrine:build-sql). Now it forced us to drop and re-create all the tables and dump back in all the information as no ALTERS were created but rather CREATE statements o...