Re: [symfony-users] [symfony 1.4] checking permissions in layout.php to make links active or inactive

2010-09-25 Thread Michael Hodges
ssion() > method. Take a look at them. > > 2010/9/25, Michael Hodges : > > Hello all, > > > > My layout features a main menu of options, each option being a link. > > Currently, a user clinks on a link and then permission logic determines > if > > the user get

Re: [symfony-users] Re: Help on sfValidatorDoctrineUnique during UPDATE please

2010-09-25 Thread Michael Hodges
One idea might be to make use of isNew to differentiate between an INSERT and and UPDATE in your logic. I've not tried this, so it's just an idea. If it doesn't work, write a custom validator and pass an option in to control the validation logic. best of luck - Michael [form.php] if ($this-

[symfony-users] [symfony 1.4] checking permissions in layout.php to make links active or inactive

2010-09-25 Thread Michael Hodges
Hello all, My layout features a main menu of options, each option being a link. Currently, a user clinks on a link and then permission logic determines if the user gets the page, or a security warning. I'd like to disable those links for which a user should not even bother clicking, essentially, t

[symfony-users] Re: [doctrine 1.2] dropping a record from a doctrine_collection

2010-09-18 Thread Michael Hodges
tUnset($fee_ofs); } } return $fees; } On Thu, Sep 16, 2010 at 7:33 PM, Michael Hodges wrote: > Hello all, > > I'm not having a luck looking this up, or with the description in the > documentation. > Hoping you can help. > > I have a function that cre

[symfony-users] [doctrine 1.2] dropping a record from a doctrine_collection

2010-09-16 Thread Michael Hodges
Hello all, I'm not having a luck looking this up, or with the description in the documentation. Hoping you can help. I have a function that creates a doctrine_collection. For reasons not explained here it is not feasible to limit the collection utilizing only DQL, so I thought to loop through th

[symfony-users] Re: Sf1.4 custom boolean field in generator results in "1" rather than checked-icon

2010-09-06 Thread Michael Hodges
[Resolved] Rereading the documentation more carefully, my [yml] was in error and needed the following correction: "type: Boolean" with a capital B. Thanks for the feedback. - Michael On Sun, Sep 5, 2010 at 6:54 PM, Michael Hodges wrote: > Hello all, > > I found

Re: [symfony-users] readonly related value in form

2010-09-06 Thread Michael Hodges
I'm also new to SF and struggled with this. My solution was a combination of javascript and php code. Hopefully the example code fragments are helpful for you. Basically, my javascript updates the readonly field rather than the user. - Michael [_form.php] echo $form['receipt_amount']->rende

[symfony-users] Sf1.4 custom boolean field in generator results in "1" rather than checked-icon

2010-09-05 Thread Michael Hodges
Hello all, I found an older thread on this topic, but no suggestion for a solution. I've introduced a custom boolean field for display only. [yml] list: fields: is_released: { label: Released, type: boolean } My function getIsReleased() returns boolean true or false. What gets displ

Re: [symfony-users] Problem using ahAdminGenerataorThemesPlugin, Customizable titles for sf 1.4

2010-09-05 Thread Michael Hodges
f the Doctrine equivalents. I'll post here once I've identified the root problem. Thanks again for your help. I've learned quite a bit as a result. - Michael On Sat, Sep 4, 2010 at 12:23 PM, Michael Hodges wrote: > Reduced the plugins to the following, cleared cache, clear

Re: [symfony-users] Problem using ahAdminGenerataorThemesPlugin, Customizable titles for sf 1.4

2010-09-04 Thread Michael Hodges
u point me to where in the source of the plugin I can disable the Customizable Titles functionality so that I have more time to trouble shoot this? Thanks, - Michael On Sat, Sep 4, 2010 at 8:11 AM, Michael Hodges wrote: > No title displays. When I view

Re: [symfony-users] Problem using ahAdminGenerataorThemesPlugin, Customizable titles for sf 1.4

2010-09-04 Thread Michael Hodges
hink we are about 12 timezones apart. - Michael On Fri, Sep 3, 2010 at 11:49 PM, Daniel Lohse wrote: > Yeah, that's right, seems to be good. What title is actually displayed, if > any? > > > Daniel > > Sent from my iPad > > On Sep 4, 2010, at 8:21 AM, Michael Hodg

Re: [symfony-users] Problem using ahAdminGenerataorThemesPlugin, Customizable titles for sf 1.4

2010-09-03 Thread Michael Hodges
e is named something else > I hope you'll spot it in there. > > Cheers, Daniel > > On 03.09.2010, at 09:07, Michael Hodges wrote: > > Thanks Daniel for the suggestions. I worked my way down the list. > The results are the same regardless of the yml section. > If I understand

Re: [symfony-users] Problem using ahAdminGenerataorThemesPlugin, Customizable titles for sf 1.4

2010-09-03 Thread Michael Hodges
bin.com? It could be that your module is named something else > I hope you'll spot it in there. > > Cheers, Daniel > > On 03.09.2010, at 09:07, Michael Hodges wrote: > > Thanks Daniel for the suggestions. I worked my way down the list. > The results are the same regardles

Re: [symfony-users] Problem using ahAdminGenerataorThemesPlugin, Customizable titles for sf 1.4

2010-09-03 Thread Michael Hodges
t the plugin again right now and will get back to you > with my findings. :) > > > Daniel > > On 03.09.2010, at 09:07, Michael Hodges wrote: > > Thanks Daniel for the suggestions. I worked my way down the list. > The results are the same regardless of the yml section. >

Re: [symfony-users] Problem using ahAdminGenerataorThemesPlugin, Customizable titles for sf 1.4

2010-09-03 Thread Michael Hodges
hole generator.yml, maybe > I can spot it somewhere in there. I'm using this plugin in several > production sites and this feature does work (especially when combined with > the tsTitlePlugin plugin). > > Cheers and thanks for using my plugin! :) > > > Daniel >

[symfony-users] Problem using ahAdminGenerataorThemesPlugin, Customizable titles for sf 1.4

2010-09-02 Thread Michael Hodges
Hello all, I installed the plugin ahAdminGenerataorThemesPlugin for the multicolumn sort feature, which works beautifully. As a side-effect, the Customizable Titles feature is a problem for me. Searching the web, it doesn't seem to be a problem for others, so I must be overlooking something very

[symfony-users] Symfony 1.4/Doctrine 1.2: specifying initial autoincrement value in a schema yaml file

2010-07-25 Thread Michael Hodges
Hello all, Currently I manually set the autoincrement value for fields in MySQL before loading fixtures using SQL syntax such as ALTER TABLE `Student` AUTO_INCREMENT =1 Is there a way to specify the initial value for autoincremented fields in the schema yaml file so that I don't have to rememb

Re: [symfony-users] Re: How I get the sf_user (the logged user) in my controller action???

2010-07-01 Thread Michael Hodges
sfContext::getInstance()->getUser() might work too On Tue, Jun 29, 2010 at 4:26 PM, Ricardo Jose Guzman Milanes < guzman.ricardoj...@gmail.com> wrote: > Hello Rodrigo > > Two weeks ago I was trying to find a way to display info only related to > the logged user. > > I used this in my action.php

[symfony-users] Re: Foreign keys are not getting populated when saving details records

2010-06-27 Thread Michael Hodges
'choices' => Doctrine::getTable('StudentFee')->getFeeTypes() )); } - - - and my relationship was defined incorrectly. Correction is PurchaseDetail: columns: purchase_id: { type: integer, primary: true, autoincrement: true } receipt_id: { type: in

Re: [symfony-users] Re: Get record id and set it into form

2010-06-21 Thread Michael Hodges
I'm having exactly this problem too and have not resolved it yet. Using xdebug I note that the SQL statement doing the actual INSERT of the detail record does not include the foreign key. I plan on making the foreign key a hidden field on the form which will hopefully make it available in the SQL

Re: [symfony-users] Functional tests for Form validators?

2010-06-15 Thread Michael Hodges
> Christopher. > > > > *Von:* symfony-users@googlegroups.com [mailto: > symfony-us...@googlegroups.com] *Im Auftrag von *Michael Hodges > *Gesendet:* Montag, 14. Juni 2010 19:56 > *An:* symfony-users@googlegroups.com > *Betreff:* Re: [symfony-users] Functional tests for Form vali

Re: [symfony-users] Functional tests for Form validators?

2010-06-14 Thread Michael Hodges
*"The Pragmatic Programmer: From Journeyman to Master" *by Andrew Hunt and David Thomas labels their chapter on this topic "Ruthless Testing" which suggests one answer to your question. It's an excellent book. - Michael On Mon, Jun 14, 2010 at 4:12 AM, Christopher Schnell wrote: > Hi all, > >

[symfony-users] Re: Foreign keys are not getting populated when saving details records

2010-06-13 Thread Michael Hodges
ign keys (record_id). Hope someone has experience trouble-shooting this type of problem. Thanks, - Michael On Sat, Jun 12, 2010 at 8:23 PM, Michael Hodges wrote: > Hello all, > > 

I have a problem with Foreign keys are not getting populated when saving > details records. The relat

[symfony-users] Foreign keys are not getting populated when saving details records

2010-06-12 Thread Michael Hodges
Hello all, 

I have a problem with Foreign keys are not getting populated when saving details records. The relationships (a pair of 1-n's) look correct, but does anyone see something I'm overlooking? Thanks for any advice. My environment is Symfony 1.4.4 with Doctrine running under XAMPP on Mac

Re: [symfony-users] Re: Symfony 1.4 project with embedded forms, user data in embedded forms not being saved

2010-06-03 Thread Michael Hodges
Hold the phone, my custom validator was not returning $values. suddenly it is all very clear. Thanks everyone who spend any time looking at this thread. On Wed, Jun 2, 2010 at 7:46 PM, Michael Hodges wrote: > Can someone help me understand how the sfFormDoctrine handles the cleaned > d

Re: [symfony-users] Re: Symfony 1.4 project with embedded forms, user data in embedded forms not being saved

2010-06-02 Thread Michael Hodges
case since all forms and subforms have to be validated before anything is saved. If it is the first case, I've not figured out what the array of cleaned values is called and where best for me to put debug statements. On Mon, May 31, 2010 at 4:50 PM, Michael Hodges wrote: > The traci

Re: [symfony-users] Re: Symfony 1.4 project with embedded forms, user data in embedded forms not being saved

2010-05-31 Thread Michael Hodges
gh sfDoctrineForm::save() method. Embedded > > forms save is not actually fired on containing form save. So if you > > have many many relation or another embedded form inside an embedded > > form, they wont be persisted. > > > > On May 31, 1:28 pm, Michael Hodges wr

[symfony-users] Symfony 1.4 project with embedded forms, user data in embedded forms not being saved

2010-05-30 Thread Michael Hodges
Hello Symfony fans, I'm hoping someone can point to the error in my ways. I am working with embedded forms and the problem is that the master record is saved to the database, but not the user date for the detail records. I have followed the 'more with symphony 1.4 en' example very carefully and

[symfony-users] problem with error message being applied to the form field

2010-05-01 Thread Michael Hodges
Hello all, I'm hoping someone can point out my mistake. For Symfony 1.4.4 with Doctrine I have a form to which I've added $this->mergePostValidator(new TransactionReceiptValidatorSchema()); in the configure() function of the form class TransactionReceiptForm extends BaseTransactionReceiptF

Re: [symfony-users] How would one suppress the +New in a form

2010-04-18 Thread Michael Hodges
Guide so give that a thorough read. The Jobeet tutorial is also a > good start. :) > > > Cheers, Daniel > > On 18.04.2010, at 20:25, Michael Hodges wrote: > > Hello all, > > I would like to suppress the option to add a new record for one of my > modules. This doesn

[symfony-users] How would one suppress the +New in a form

2010-04-18 Thread Michael Hodges
Hello all, I would like to suppress the option to add a new record for one of my modules. This doesn't seem to be possible using the module's generator.yml, like is possible for suppressing the option to filter the list. As an alternative, if I could somehow redirect url 'transaction/new' to anot

Re: [symfony-users] use_javascripts_for_form($form) apparently not working

2010-04-12 Thread Michael Hodges
L621 > > http://trac.symfony-project.org/browser/branches/1.4/lib/form/sfForm.class.php#L727 > > On Mon, Apr 12, 2010 at 00:52, michael hodges wrote: > > Hello all, > > > > Not sure how something so fundamental to Symfony is not working for > > me, but for my backend

[symfony-users] use_javascripts_for_form($form) apparently not working

2010-04-11 Thread michael hodges
Hello all, Not sure how something so fundamental to Symfony is not working for me, but for my backend module I have in my templates directory a _form.php file and a _form.js file. The php file is functioning in that my form and subforms etc render properly, but the javascript functions in the js

[symfony-users] Re: for the sfGuardPlugin, how do determine from within layout.php if a user has authenticated

2010-03-25 Thread michael hodges
that works perfectly!!! Many thanks. I was looking for something like $sf_user, but I'm still figuring out how to discover what is in the current context. - Michael On Mar 25, 3:06 pm, Michał Piotrowski wrote: > Hi, > > 2010/3/26 michael hodges : > > > Hello al

[symfony-users] Re: for the sfGuardPlugin, how do determine from within layout.php if a user has authenticated

2010-03-25 Thread michael hodges
cs/mililani/plugins/ sfDoctrineGuardPlugin/lib/user/sfGuardSecurityUser.class.php on line 230 On Mar 25, 2:58 pm, Tom Haskins-Vaughan wrote: > I'm pretty sure a user instance is created regardless of whether > you're logged in or not, or even whether or not you're using sfGuar

[symfony-users] for the sfGuardPlugin, how do determine from within layout.php if a user has authenticated

2010-03-25 Thread michael hodges
Hello all, Another newbie question. I've spent several days hunting for a way to determine if a user has been authenticated or not from within layout.php Reading the API (symfony 1.4) I thought one of the three boolean functions below would let me know if a user object is instantiated or not, bu

Re: [symfony-users] Installing ahDoctrineEasyEmbeddedRelations plugin on Symfony 1.4 under PHP 5.3

2010-02-21 Thread Michael Hodges
Hello Daniel, Don't be hard on yourself. It's only us newbies that probably are stumbling on this. You've given me a hint as to what to look for in reworking your plugin. I'll see if I can adapt it to my purposes--a bit of a longshot, but I'll share my results if successful. Best of luck with

Re: [symfony-users] Installing ahDoctrineEasyEmbeddedRelations plugin on Symfony 1.4 under PHP 5.3

2010-02-20 Thread Michael Hodges
); > > I hope this makes it clear. I'll try to make it work with more schema > definitions. Could you maybe send me your schema plus the relevant code of > your form's configure method that was not working? That'd be great and > highly appreciated! > > > Regards, Dan

Re: [symfony-users] Installing ahDoctrineEasyEmbeddedRelations plugin on Symfony 1.4 under PHP 5.3

2010-02-20 Thread Michael Hodges
his is not the case, then you'd have to give me more details. > > Please let me know if there's anything else that's not working or if you > have any more questions. > > > Regards, Daniel > > On 20.02.2010, at 05:36, Michael Hodges wrote: > > > Hell

[symfony-users] Installing ahDoctrineEasyEmbeddedRelations plugin on Symfony 1.4 under PHP 5.3

2010-02-19 Thread Michael Hodges
Hello all, I'm working on my first app and the embedded relations plugin looks perfect for my needs. Upon installation I generated a bushel of errors: Deprecated: Function set_magic_quotes_runtime() is deprecated in /Applications/xampp/xamppfiles/lib/php/pear/PEAR/Registry.php on line 1115 Depreca

[symfony-users] Re: ORDER BY insists on using sort_order

2010-02-07 Thread michael hodges
files. Must be something pecular to my platform since this problem doesn't seem to have driven anyone else nuts. My platform is OSX 10.6.2, firefox 3.5.7, symfony 1.4.1 Hope this info saves someone else a few hours effort. - Michael On Feb 6, 8:04 pm, michael hodges wrote: > Problem not

[symfony-users] Re: ORDER BY insists on using sort_order

2010-02-06 Thread michael hodges
ing Symfony 1.4 with Doctrine and mostly just experimenting with what I'm learning from the jobeet tutorial. - Michael On Feb 5, 10:15 pm, michael hodges wrote: > Problem resolved by creating a whole new project directory and > starting over. > I was able to copy all generator

[symfony-users] Re: ORDER BY insists on using sort_order

2010-02-06 Thread michael hodges
just gets weirder. - Michael On Feb 5, 7:08 pm, michael hodges wrote: > # In which file did you find the "sort_order" > database_interface.lib.php > > # Did you clear the cache > First I cleared the cache, but that didn't work > Second I renamed the app directory

[symfony-users] Re: ORDER BY insists on using sort_order

2010-02-05 Thread michael hodges
ee that this is an active list. - Michael On Feb 5, 12:40 am, Tom Ptacnik wrote: > Did you cleared the cache folder? > > In which file ddid you find the "sort_order" (as you said you have > found it in internal symfony files...) > > On 4 ún, 09:29, michael hodges wrote: &

[symfony-users] ORDER BY insists on using sort_order

2010-02-04 Thread michael hodges
Hello all, I'm new to Symfony. While I've been able to figure things out as I go along, this one is very strange. I had a column named 'sort_order' and used if in the generator.yml to request a sort in the list. Subsequently I removed it from the schema and regenerated everything, including the