symfony

What does this doctrine query do?

$this->facebook_applications = Doctrine::getTable('FacebookApplication') ->createQuery('a') ->execute(); I don't understand how this works at all. Why is the query just 'a' and why does that seem to get a list of the applications? ...

apache, httpd.conf and symfony - can't see styles or images

Well, seems that so far the tutorial is working as it suppose to. However, I can't get it to use styles and images. I am using win7 + wamp + symfony sandbox 1.4 The project i the Jobeet tutorial. the path for the www folder is: "d:\dev\wamp\www" My project folder is located directly under the www path and named: 'banana'. I changed ...

Wrong output escaping in Symfony URL

Hi, I'm trying to use url_for() helper function of Symfony to get some URL's for my web application. url_for() function works well if values of get parameters are numeric. But the weird thing is that if a value of a get parameter is a string, then the next get parameter is escaped in a wrong way. For example; echo url_for("konu/index?...

Symfony: How to access the user object early in execution

Hi, I have a custom routing class that checks versioning of an object to allow for creation of draft versions of pages that wont appear on the live site. When an admin clicks to preview a draft version of a page my PublishingHelper class on the front-end (called from the routing class) checks the user's permissions to see if they are al...

Eclipse PDT 2.2.0 does not track Symfony classes

Hello, My last version of Eclipse PDT does not track symfony project code and so i cannot use autocomplete and search class actions. I have last version symfony 1.4 included in my project's /lib dir. (I'am teaching symfony now with a Jobeet reference project to be concrete). THX ...

symfony 1.4: two questions about sfDoctrineApplyPlugin (well, could be also considered as general questions)

Hi, I have found in sfDoctrineApplyPlugin a template called applyAfter.php that shows a message like "You have registered ok..." after the users apply for an account. It is called from the sfApply/apply action this way: "return 'After';" when the apply form is valid. What kind of template is that? I never saw that way (return 'After';)...

symfony - clean variables before sending to template

Hi! On the project I am currently working, I had created an action that generates a csv file. Here is some of my current template codem, which generated the csv file on-the-fly: <?php header('Content-Disposition: attachment; filename="file_'.date("Y-m-d_H-i",time()) .'.csv"'); ?> Branch:;<?php echo $branch; ?>; The variable $branch,...

[Symfony2] Incompatible Kernel method signature

Hi, I'm encoutering a problem, but really don't understand why! I get this error when launching Symfony ( via front controller or CLI ) PHP Fatal error: Declaration of ECommerceKernel::registerContainerConfiguration() must be compatible with that of Symfony\Framework\Kernel::registerContainerConfiguration() The problem is the overr...

symfony: How to translate a text that contains <p></p> ?

Hi, i want to translate this below: <?php echo __(<<<EOM <p> For security reasons... </p> EOM ) ?> So i create this translation unit: <trans-unit> <source>For security reasons...</source> <target>Por razones de seguridad...</target> </trans-unit> The problem: it is not translated less than i remove the <p> </p> tags. Any way to t...

Premature end of script headers: php5 Symfony produces internal server error 500

Hello Stack Overflowers, I am running into an issue that is leaving me in a dead end so in turn, I turn to you! Recently a Symfony app has been going down rendering an internal apache error -500. After deleting the Symfony cache the site comes back up. Upon some further investigating I have found the error of "Premature end of script...

Form generation on the fly / Dynamic forms / forms generated from models

Has anyone tips with building applications similar too wufoo.com? I am building an app where the logged in user creates forms in a similar manner...what i am wondering is if zend, symfony or yii is best suited for this? I will be collecting tips here for other to see easier. advantages of the frameworks that could help with this: Sym...

Stop symfony from escaping html from query result

Currently I am using ckEditor with ckFinder in Symfony. When I save a form the HTML is saved (seemingly so) properly in the database. When I query through symfony and retrieve the results, the html tags are removed and replaced. Can I prevent this? Below is an example of what is in the database. I tried putting in what the HTML Shows but...

Help With Embedded BaseFormDoctrine Forms

Hello, I have the following code blocks: class MerchantStoreForm extends sfForm { public function configure() { $this->disableCSRFProtection(); $this->setWidgets(array( 'brand_id' => new sfWidgetFormDoctrineChoice(array('label'=> 'Store Brand','model'=>'Brand','add_empty'=>'-Select Brand-','method'=>'getName','ke...

Symfony page on subdomain with different IP address?

I am using Symfony 1.3.6 on Ubuntu, and I want to partition my website into a separate subdomain on a different IP address. Is it possible to have a page that is on a subdomain with a different IP address? For example, my main website is on http://www.mysite.com and I want to have a page with a url like this: http://www.pigeonfancier...

Symonfy 1.4 dynamic validation possible?

Hi all, I'm trying to create a form that change the validation of a field based on the select option from the html form field. Ex: if user select a option 1 from drop down field "options", I want the field "metric" to validate as sfValidatorInteger. If user select option 2 from field "options", I want the field "metric" to validate as...

symfony doctrine - insert/update Doctrine object from Excel

Hi! On the project which I am currently working, I have to read an Excel file (with over a 1000 rows), extract all them and insert/update to a database table. 1ª Question: in terms of performance, is better to add all the records to a Doctrine_Collection and insert/update them after using the fromArray() method, right? One other possib...

What is the safest way of passing arguments from server-side PHP to client-size JavaScript

Hello, In my application I rely heavily on JavaScript to enhance the user interface, but all of the data comes from a database and is processed by PHP. By default I use 'echo' statements to substitute the required values "just in time" like so: var myVariable = <?php echo $myVariableInPHP ?> This, however, does not strike me as very ...

Symfony Unit Testing and Excessive Memory Leaks?

We're currently having issues with memory leaks when using unit tests with Symfony 1.x to the magnitude of a decent number of tests eating 512MB of memory. Currently we've tried: Using a phpunit plugin Using lime Restricting the tests to a few sfPropelData loads + functional tests repeated a few times Switching to PHP 5.3.3 to handle...

How to make 'symfony doctrine:build-sql' task generate 'DROP' statments ?

Is there a way to make symfony doctrine:build-sql task generate DROP statments before CREATE TABLE ones as it symfony propel:build-sql does ? ? ...

symfony: the form empty values are not translated

Hi, I have a select to change the language of a registering form and i have this widget: $this->setWidget('birth_date', new sfWidgetFormI18nDate(array( 'culture' => 'es_ES', 'years' => array_combine($years, $years), 'empty_values' => array('day' => 'Dia', 'month' => 'Mes', 'year' => 'Anyo'))) ); I have translated a...