[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,

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

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

2010-09-25 Thread Michael Hodges
-hasPermission() method. Take a look at them. 2010/9/25, Michael Hodges mhodg...@gmail.com: 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

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

2010-09-18 Thread Michael Hodges
); } } return $fees; } On Thu, Sep 16, 2010 at 7:33 PM, Michael Hodges mhodg...@gmail.com 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 creates

[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

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

[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 mhodg...@gmail.com wrote: Hello all, I found

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

2010-09-05 Thread Michael Hodges
to that of 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 mhodg...@gmail.com wrote: Reduced the plugins to the following, cleared cache, cleared

[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

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

2010-09-04 Thread Michael Hodges
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. If I understand frontend vs backend, since I'm using only

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

2010-09-04 Thread Michael Hodges
? 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 regardless of the yml section. If I understand

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

2010-09-04 Thread Michael Hodges
? 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 regardless of the yml section. If I understand

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

2010-09-04 Thread Michael Hodges
, 2010, at 8:21 AM, Michael Hodges mhodg...@gmail.com wrote: http://pastebin.com/tRhm2jaWhttp://pastebin.com/tRhm2jaW I'm new to looking at these, but the title is correctly inserted it seems to me. I'll experiment with the other objects to see if I can figure out what's different about

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

2010-09-04 Thread Michael Hodges
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 mhodg...@gmail.com wrote: No title displays. When I view the browser source I have the following: div id

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

2010-09-03 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

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

2010-09-03 Thread Michael Hodges
and this feature does work (especially when combined with the tsTitlePlugin plugin). Cheers and thanks for using my plugin! :) Daniel Sent from my iPad On Sep 3, 2010, at 8:31 AM, Michael Hodges mhodg...@gmail.com wrote: Hello all, I installed the plugin ahAdminGenerataorThemesPlugin

[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

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-28 Thread Michael Hodges
} . . . relations: TransactionReceipt: local: receipt_id foreign: receipt_id foreignAlias: Purchases foreignType: many . . . On Sat, Jun 12, 2010 at 8:23 PM, Michael Hodges mhodg...@gmail.com wrote: Hello all, 

I have a problem with Foreign keys are not getting

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

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

2010-06-15 Thread Michael Hodges
[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 validators? The Pragmatic Programmer: From Journeyman to Master by Andrew Hunt

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

2010-06-14 Thread Michael Hodges
someone has experience trouble-shooting this type of problem. Thanks, - Michael On Sat, Jun 12, 2010 at 8:23 PM, Michael Hodges mhodg...@gmail.com wrote: 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

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 ty...@mda.ch wrote: Hi

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

2010-06-13 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

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 mhodg...@gmail.com wrote: Can someone help me understand how the sfFormDoctrine handles

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 mhodg...@gmail.com wrote

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
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 mhodg...@gmail.com wrote: Hello Symfony fans, I'm hoping someone can point

[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

[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

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

2010-04-18 Thread Michael Hodges
, Michael Hodges wrote: 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

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

2010-04-12 Thread Michael Hodges
://trac.symfony-project.org/browser/branches/1.4/lib/form/sfForm.class.php#L727 On Mon, Apr 12, 2010 at 00:52, michael hodges mhodg...@gmail.com wrote: 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

[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] 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,

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

2010-03-25 Thread michael hodges
/ sfDoctrineGuardPlugin/lib/user/sfGuardSecurityUser.class.php on line 230 On Mar 25, 2:58 pm, Tom Haskins-Vaughan t...@templestreetmedia.com 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 sfGuard. On 3/25/10, michael hodges

[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 mkkp...@gmail.com wrote: Hi, 2010/3/26 michael hodges mhodg...@gmail.com: Hello all

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
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: 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

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

2010-02-20 Thread Michael Hodges
! Regards, Daniel On 20.02.2010, at 18:05, Michael Hodges wrote: Thanks Daniel for the quick reply and the reassurance. You've accurately surmised my situation. I'm proceeding with implementation of the plugin in my project. Your instructions are very clear and yet the relation/Parser.php

[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 mhodg...@gmail.com wrote

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

2010-02-06 Thread michael hodges
weirder. - Michael On Feb 5, 7:08 pm, michael hodges mhodg...@gmail.com 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 and recreated it from scratch

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

2010-02-06 Thread michael hodges
just experimenting with what I'm learning from the jobeet tutorial. - Michael On Feb 5, 10:15 pm, michael hodges mhodg...@gmail.com wrote: Problem resolved by creating a whole new project directory and starting over. I was able to copy all generator.yml files, partials, etc without making

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

2010-02-05 Thread michael hodges
. - Michael On Feb 5, 12:40 am, Tom Ptacnik to...@tomor.cz 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 mhodg...@gmail.com wrote: Hello all, I'm new to Symfony

[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