Re: [symfony-users] Re: trouble writing a dql query

2011-02-02 Thread Alan Bem
at http://groups.google.com/group/symfony-users?hl=en -- Pozdrawiam, Alan Bem Profil na GoldenLine.pl http://www.goldenline.pl/alan-bem http://www.recovery.pl/ -- If you want to report a vulnerability issue on symfony, please send it to security at symfony-project.com You received this message

Re: [symfony-users] Two different objects on the same list

2011-01-02 Thread Alan Bem
I also thought about inheritance with doctrine, but i don't like having one table with everything inside (in the case of simple and column aggregation inheritance, the concrete inheritance doesn't seem to be helpful in that case). I would go with that, If youre worried about displaying

Re: [symfony-users] doctrine many-to-many relation

2010-12-31 Thread Alan Bem
Tax: actAs: Timestampable: ~ columns: # your columns relations: Properties: class:Property local:tax_id foreign: property_id refClass: PropertyTax foreignAlias: Taxes Property: actAs: Timestampable: ~ columns: #

Re: [symfony-users] Re: Need to hide sfWidgetFormDoctrineChoice dropdown when editing existing record

2010-12-28 Thread Alan Bem
{ $this-setWidgets(array( ... 'pref_id' = new sfWidgetFormInputHidden(), ... } Your comment about security got me thinking. Does anyone have experience securing sfWidgetFormInputHidden? Dmitry On Dec 25, 3:50 pm, Alan Bem alan@gmail.com wrote: If you want to hide any widget, don't

Re: [symfony-users] Need to hide sfWidgetFormDoctrineChoice dropdown when editing existing record

2010-12-25 Thread Alan Bem
If you want to hide any widget, don't outputing them is not a good (secure) choice. Here's better idea: In configure() method of your form put if($this-getObject()-isNew()) { $this-widgetSchema['preference_id'] = //etc $this-validatorSchema['preference_id'] = //etc } or in case

Re: [symfony-users] Re: front end product gallery

2010-10-18 Thread Alan Bem
Use sfImageTransformExtraPlugin - it is very easy to use, customizable plugin, that requires almost nothing to make it work (transparently). 2010/10/17 xpanshun srhen...@gmail.com How would I call to this class from my indexSuccess.php to get the images to resize as they are displayed? *See

Re: [symfony-users] Re: front end product gallery

2010-10-18 Thread Alan Bem
thumbnail_tag('...path to image', 200, 200); and the conversion is happening on the fly - once. Daniel On Oct 18, 12:33 am, Alan Bem alan@gmail.com wrote: Use sfImageTransformExtraPlugin - it is very easy to use, customizable plugin, that requires almost nothing to make it work

Re: [symfony-users] SF2: How inject container as service into model

2010-09-24 Thread Alan Bem
I would create a factory but IMHO it is bad design decision to couple domain models with container. 2010/9/24 Ladislav Prskavec ladislav.prska...@gmail.com I have simple controller: class HelloController extends Controller { public function indexAction($name) { $owner =

Re: [symfony-users] A bug in the Web debug toolbar notification?

2010-09-15 Thread Alan Bem
Do you redirect? 2010/9/15 Jorge Luis betancourt.jo...@gmail.com Hi: It's normal that when we send an email from an action that don't have any associated template there is no notification of this in the Web debug toolbar? I'm sending a confirmation email from a create action (from a CRUD

Re: [symfony-users] The module and action names are not present in the internal URI?

2010-09-13 Thread Alan Bem
...and ommit later on. 2010/9/13 Alan Bem alan@gmail.com @default route specify module and action names as parameters, thats why they are present in that internal uri you paste default: url: /:module/:action/* but in the end you can hardcode them in routing.yml -- If you want

Re: [symfony-users] Re: How i can implement this with sfGuard plugin

2010-08-14 Thread Alan Bem
Wouldn't it be better? $this-getUser()-getGuardUser()-getJobs()? You just need to add proper relation between sf_guard_user and job tables. 2010/8/14 Tom Ptacnik to...@tomor.cz Maybe better would be to store the id of the user not the username. But the principle is right. And this code of

Re: [symfony-users] Re: [DI] How can I put data into getFooService?

2010-08-14 Thread Alan Bem
Create factory and pick it with DI $translatorFactory = $sc-getTranslatorFactoryService(); $tranlator = $translatorFactory-create(''translation namespace'); 2010/8/14 Константин molodch...@gmail.com Have you in plans implementing this feature? Or no sense? Also: add support of Multiton

Re: [symfony-users] Symfony2 comments and questions

2010-07-11 Thread Alan Bem
+1 on GuardBundle/SecurityBundle :) On Sun, Jul 11, 2010 at 1:17 PM, Tarjei tar...@scanmine.com wrote: Hi, here are my initial questions and comments regarding Symfony2. They have been written over a period of about a week as I evaluated if I wanted to try to use Symfony2 for a rewrite of an

Re: [symfony-users] Symfony2 comments and questions

2010-07-11 Thread Alan Bem
: On 07/11/2010 06:53 AM, Alan Bem wrote: +1 on GuardBundle/SecurityBundle :) \ There is a version started already http://symfony2bundles.org/knplabs/DoctrineUserBundle -- If you want to report a vulnerability issue on symfony, please send it to security at symfony-project.com You received

Re: [symfony-users] symfony and Eclipse: I can not go to the function or class using F3.

2010-07-11 Thread Alan Bem
On Sun, Jul 11, 2010 at 8:29 PM, samuel zoulil...@gmail.com wrote: Is netbeans supporting symfony2 ? no -- If you want to report a vulnerability issue on symfony, please send it to security at symfony-project.com You received this message because you are subscribed to the Google Groups

Re: [symfony-users] [RFC] sfUnifiedGuard for Symfony 2

2010-05-06 Thread Alan Bem
thumbs up On Wed, May 5, 2010 at 6:44 PM, Daniel Lohse annismcken...@googlemail.comwrote: Yes, that really is awesome! +1 Sent from my iPhone On May 5, 2010, at 5:34 PM, Javier Garcia tirengar...@gmail.com wrote: On 05/04/2010 01:16 PM, Michał Piotrowski wrote: Sounds interesting?

Re: [symfony-users] how to get the pattern of a route?

2010-04-22 Thread Alan Bem
$this-getContext()-getRouting()-getCurrentRouteName() On Wed, Apr 21, 2010 at 10:51 PM, comb sa...@gmx.net wrote: Hi! I have two routes: routing.yml video_list_category_bestrated: url: /video/category/:category_slug/bestrated class: sfDoctrineRoute options: { model: VideoCategory,

Re: [symfony-users] Re: Difference between sfFormDoctrine methods: doSave(), save(), updateObject()

2010-04-16 Thread Alan Bem
Every do*() method is kind of hook which you can overwrite without much impact on other parts form framework. Of course you have to know what are you doing, but this is safest way to extend/add your own logic. Read

Re: [symfony-users] Where is frontend.php after deploying?

2010-04-13 Thread Alan Bem
Well, by default there is no frontend.php - there's only index.php. Maybe that is your answer. 2010/4/13 Michał Piotrowski mkkp...@gmail.com 2010/4/13 Javier Garcia tirengar...@gmail.com: Hi, after deploying using sf 1.3, where is frontend.php? I didn't get any error during the

Re: [symfony-users] Re: memory leaks... just keep on leaking

2010-04-12 Thread Alan Bem
Hi Richard Model::clearInstancePool() is not only mechanism that tries to solve memory leaks issue in Propel - check this out,http://bugfeatures.com/blog/comments.php?y=09m=08entry=entry090809-055809#entry090809-055809_comment090809-134908 Also, you should take into consideration manually

Re: [symfony-users] Re: sfValidatorDoctrineUnique doesn't work when only defined in BaseForm?

2010-04-12 Thread Alan Bem
the code from BaseSubscriberForm to SubscriberForm to make it work. On Apr 11, 8:37 pm, Alan Bem alan@gmail.com wrote: Aren't you talking about two different Forms? It seems that first post-validator comes from (Base)SubscriberForm, but you complaint about NewsletterForm

Re: [symfony-users] dont display : filter_backend

2010-04-12 Thread Alan Bem
In generator.yml config: filter: class: false On Mon, Apr 12, 2010 at 4:56 PM, safa boubekri boubekri.s...@gmail.comwrote: hello i want to khow how to hide the forms of filters in the backend thank you very much -- If you want to report a vulnerability issue on symfony,

Re: [symfony-users] Generate-Module : Only Show and Index for FrontEnd (NO Edit or New)

2010-04-11 Thread Alan Bem
Adjust generator.yml config file.http://www.symfony-project.org/reference/1_4/en/06-Admin-Generator#chapter_06_sub_object_actions On Sun, Apr 11, 2010 at 6:02 AM, Bill P. maxar...@yahoo.com wrote: Hello, Is there a parameter to 'generate-module' that will just do Show and Index without Edit

Re: [symfony-users] sfValidatorDoctrineUnique doesn't work when only defined in BaseForm?

2010-04-11 Thread Alan Bem
Aren't you talking about two different Forms? It seems that first post-validator comes from (Base)SubscriberForm, but you complaint about NewsletterForm. Is there inheritance relationship beetween them? Cheers On Sat, Apr 10, 2010 at 5:05 PM, godbout guillaume.lecler...@gmail.comwrote: Hi

Re: [symfony-users] Transforming images after upload and before saving

2010-04-10 Thread Alan Bem
Make it simpler - do it directly inside of forms you embed. /** * Read my comments. */ class ImageForm extends BaseImageForm { // configure() your form /** * This is hook used by Doctrine (and think Propel as well) form to modify * cleaned up (validated) values. * * This is

Re: [symfony-users] Accessing user session from a custom routing class

2010-03-24 Thread Alan Bem
Context is available as an attribute in sfRoute::$context. On Wed, Mar 24, 2010 at 2:59 AM, Tom Haskins-Vaughan t...@templestreetmedia.com wrote: +1 On Tue, Mar 16, 2010 at 1:17 PM, Jose Antonio Pio Gil joseto...@gmail.com wrote: I have the same question about it! 2010/3/16 HiDDeN

Re: [symfony-users] Re: Accessing user session from a custom routing class

2010-03-24 Thread Alan Bem
On Wed, Mar 24, 2010 at 4:08 PM, HiDDeN davidmoralesmoj...@gmail.comwrote: I have tried sfRoute::$context And from a custom routing class it returns Fatal error: Access to undeclared static property: sfRoute::$context sfRoute::$context is just a notation. sfRoute::$context is available

Re: [symfony-users] How to different forms filters in backend and frontend ?

2010-03-15 Thread Alan Bem
Set this up in generator.yml in each module.http://www.symfony-project.org/reference/1_4/en/06-Admin-Generator#chapter_06_sub_class On Mon, Mar 15, 2010 at 9:49 PM, Javier Garcia tirengar...@gmail.comwrote: Hi, I have 2 modules (one in the backend and the other one in the frontend) based on

Re: [symfony-users] Singular Plural in generator.yml

2010-02-20 Thread Alan Bem
In generated templates/actions like edit, create or delete generator uses singular names for single ORM object eg. $user. In generated templates/actions like index collections/arrays are used for multiple ORM objects. Their names are pluralized because it makes code more sensible for constructions

[symfony-users] Re: Propel 1.3 Vs Doctrine 1.2

2009-11-04 Thread Alan Bem
cosmo, you're wrong. Propel is much alive.http://propel.phpdb.org/trac/timeline On Wed, Nov 4, 2009 at 1:39 PM, cosmy c.zec...@gmail.com wrote: I think you should learn doctrine, because propel is no more developed.. On 4 Nov, 10:39, Alexandru-Emil Lupu gang.al...@gmail.com wrote: HI! I

[symfony-users] Re: Check form

2009-10-19 Thread Alan Bem
Create 2 form-processing actions - one for each form - in your module and set its URLs for both forms - in their action attribute - respectively. Alan On Mon, Oct 19, 2009 at 8:13 PM, Eno symb...@gmail.com wrote: On Mon, 19 Oct 2009, HAUSa wrote: Because I want the users to be able to

[symfony-users] Re: Connect to Sybase ASE

2009-10-16 Thread Alan Bem
Are you on Windows? On Windows its better to use ODBC due some obsolete DLLs. On Fri, Oct 16, 2009 at 9:01 PM, Jonathan Wage jonw...@gmail.com wrote: I don't think PDO has sybase support does it? - Jon On Fri, Oct 16, 2009 at 10:37 AM, Rodrigo Ruiz Fuentes rru...@gmail.comwrote: Hi,

[symfony-users] Re: SfGuard : Remember me not working...

2009-08-10 Thread Alan Bem
Did you enabled sfGuardBasicSecurityFilter in filters.yml? On Mon, Aug 10, 2009 at 11:39 AM, Aurélien Lansmanne ulyss...@gmail.comwrote: Hello, I know this problem is not new, and maybe it has already been asked, but I haven't been able to find one. When I want to login on my website, and

[symfony-users] Re: dynamic tables/forms/models with symfony

2009-08-07 Thread Alan Bem
You shouldn't change database schema on livin' thing. Don't tread forms only as objects related with existing tables. Take my previous advise into consideration and create tables that could store your form schema and user inputs along with some module for visual designing those forms. Cheers,

[symfony-users] Re: symfony extensible model for other data source than default ORM (API, SOAP WS, CouchDB...)

2009-08-04 Thread Alan Bem
Hi JP In the matter-of-fact - datasource agnostic model is M in *proper* MVC. Look at Agavi frameworks' approach. Their initial model is simple PHP object with some framework tie-in's (of course it is possible to loose those tie-in and work with POPO). It gives developers the posibility to design

[symfony-users] Re: dynamic tables/forms/models with symfony

2009-08-03 Thread Alan Bem
Do you mean forms that are connected with those tables? If answer is yes... this is not the way. Instead, You can store your form data in well designed tables. Create your own sfFormVisual that will manage saving, editing and building visual representation of the form based on database data and

[symfony-users] Re: Help For Nested Form

2009-07-29 Thread Alan Bem
Also look at sfForm::embedFormForEach() method. http://www.symfony-project.org/api/1_2/sfForm#method_embedformforeach On Wed, Jul 29, 2009 at 11:04 AM, mirfan m.irfa...@gmail.com wrote: use embedForm in the forms class class Game extends ..{ $this-embedForm('formname', new

[symfony-users] Re: how to use generator.yml

2009-03-31 Thread Alan Bem
supply frontend as argument in generator CLI On Tue, Mar 31, 2009 at 11:37 AM, sachin jain jainsachi...@gmail.comwrote: how to use generator.yml in frontend --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups

[symfony-users] Re: How to access sfWebRequest object from the model

2009-03-21 Thread Alan Bem
Yep, coupling model with outside data is really, really bad idea. Let's look at Lee's example of using plain $_SERVER array. It works. It works almost everywhere... ALMOST. 1. What if U will decide to move models to another project with another framework? What if that framework import all outside

[symfony-users] Re: How to access sfWebRequest object from the model

2009-03-21 Thread Alan Bem
, with a valid value every time a new object is created. You can also dispense with logic to handle when this value hasn't been set, validation of the value that's been set etc Alternatively, you could probably use a Doctrine behaviour to achieve the same. On 21 Mar 2009, at 10:32, Alan Bem

[symfony-users] Re: How to access sfWebRequest object from the model

2009-03-21 Thread Alan Bem
On Sat, Mar 21, 2009 at 4:51 PM, Lee Bolding l...@leesbian.net wrote: Yup, I tested it - you can. I never thought of that before. I always assumed (hoped?) the Zend Engine would somehow make environment variables read-only. Let me quote a line from great movie A Knight's Tale: *(...) Pain*,

[symfony-users] Re: How to access sfWebRequest object from the model

2009-03-21 Thread Alan Bem
, but there are so many reasons why it would be better not to do it. And of course its fine to discuss different options; cause this is a very good way to learn good design patterns. Fabian On Sat, Mar 21, 2009 at 12:40 PM, Alan Bem alan@gmail.com wrote: On Sat, Mar 21, 2009 at 12:05 PM, Lee

[symfony-users] Re: About admin generator again, set filters dynamically?

2009-03-20 Thread Alan Bem
mentioned. On Thu, Mar 19, 2009 at 4:15 PM, Alan Bem alan@gmail.com wrote: In your modules lib folder: %your_module_name%/lib/%your_module%GeneratorConfiguration.class.php On Thu, Mar 19, 2009 at 12:25 AM, Frank He hexuf...@gmail.com wrote: Where is that file you mentioned? I just know

[symfony-users] Re: Admin generator : Use different Peer method according to the credential of the connected user

2009-03-20 Thread Alan Bem
Use *your_module*GeneratorConfiguration.class.php. Its PHP based generator configuration. U can specify peer there without touching actions. Cheers, Alan On Fri, Mar 20, 2009 at 1:07 PM, Tomasz Ignatiuk tomek.ignat...@gmail.comwrote: You can ovverride buildCriteria() method in actions. Check

[symfony-users] Re: disable project but allow access based on IP address

2009-03-20 Thread Alan Bem
I u want to do that highly congiurable (create module maybe with IP table?) I would use execution filter - create your own or modify existing security filtter. Cheers, Alan On Fri, Mar 20, 2009 at 12:40 PM, CiPheR an...@stepuptravel.org wrote: Thanks for the suggestions. IP tables or firewall

[symfony-users] Re: disable project but allow access based on IP address

2009-03-20 Thread Alan Bem
Yep, it could be :) On Fri, Mar 20, 2009 at 2:05 PM, Sid Bachtiar sid.bacht...@gmail.comwrote: Could be made a plugin ;-) On Sat, Mar 21, 2009 at 2:02 AM, Alan Bem alan@gmail.com wrote: I u want to do that highly congiurable (create module maybe with IP table?) I would use execution

[symfony-users] Re: Preventing post validators from running

2009-03-20 Thread Alan Bem
sfValidatorPropelUnique as post validator? When did that changed? Here's some live code from one of my forms: $this-setValidator('health_care_institution_book_number', new sfValidatorAnd(array( new sfValidatorRegex(array('required' = false, 'pattern' =

[symfony-users] Re: How can I get the widget type ?

2009-03-20 Thread Alan Bem
get_class($this-getWidget()) On Sat, Mar 21, 2009 at 1:37 AM, fredlab frederic.beauf...@free.fr wrote: Hey, Suppose you have define a widget as is : $this-setWidget('problem_code', new sfWidgetFormJQueryAutocompleter (array( 'url' =

[symfony-users] Re: How can I get the widget type ?

2009-03-20 Thread Alan Bem
Of course, supply the name of a widget. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups symfony users group. To post to this group, send email to symfony-users@googlegroups.com To unsubscribe from this group, send

[symfony-users] Re: About admin generator again, set filters dynamically?

2009-03-19 Thread Alan Bem
, is that right? On Wed, Mar 18, 2009 at 3:11 AM, Alan Bem alan@gmail.com wrote: Look at *your_module*/lib/*your_module*GeneratorConfiguration.class.php. You can change there almost any AG configuration at runtime. Cheers, Alan Gabriel Bem On Wed, Mar 18, 2009 at 2:49 AM, xhe hexuf

[symfony-users] Re: About admin generator again, set filters dynamically?

2009-03-18 Thread Alan Bem
Look at *your_module*/lib/*your_module*GeneratorConfiguration.class.php. You can change there almost any AG configuration at runtime. Cheers, Alan Gabriel Bem On Wed, Mar 18, 2009 at 2:49 AM, xhe hexuf...@gmail.com wrote: This is still about admin generator. Are there anyway to set filters

[symfony-users] Re: Admin generator: actions per record

2009-03-09 Thread Alan Bem
Every AG generated module has *GeneratorConfiguration.class.php and *GeneratorHelper.class.php classes. I would look there first. Cheers, Alan LBO Bem On Mon, Mar 9, 2009 at 7:09 PM, Tomasz Ignatiuk tomek.ignat...@gmail.comwrote: I don't think it is possible to do automatically. You have to

[symfony-users] Re: how do I set a default value for a hidden input?

2009-03-06 Thread Alan Bem
Look at this example: $this-setWidget('referer', new sfWidgetFormInputHidden()); $this-setDefault('referer', sfContext::getInstance()-getRequest()-getReferer()); Cheers, Alan Gabriel Bem On Fri, Mar 6, 2009 at 1:16 PM, Lawrence Krubner lkrub...@geocities.comwrote: I've tried this: