Skip to content

Conversation

@JJK801
Copy link

@JJK801 JJK801 commented Feb 25, 2013

Hi stof,

This update is comming from troubles we had to set a filter parameter at the application start, it enable default values in the config files without breaking older configs.

Jérémy

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why oFilter ?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

$filter is the filter name and $oFilter the filter object, is it a problem?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

we are not using the o*, s* convention to name variable starting with their type. So it is weird to have it used in a single place.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ok, $filterObject sounds better?

@stof
Copy link
Member

stof commented Feb 25, 2013

your XML configuration will not work(try to put at lest 2 parameters) as it is not how prototype nodes should be represented.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is wrong

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

oh yes, i missed that...

@JJK801
Copy link
Author

JJK801 commented Feb 25, 2013

This will fix previouly said bad things

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

spaces should be around the braces, not inside them

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ok, i will fix it

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

there is an extra space here

@intel352
Copy link

intel352 commented Mar 3, 2013

+1 -- I need this functionality as well (ability to set parameters for filters within config).

@omansour
Copy link

omansour commented Mar 4, 2013

👍 we need this PR at work

stof added a commit that referenced this pull request Mar 5, 2013
Enabling filter's default parameters in config files
@stof stof merged commit d355798 into doctrine:master Mar 5, 2013
@JJK801 JJK801 deleted the filters branch March 6, 2013 18:16
@trsteel88
Copy link

Is there a way to use the service container to inject a value?

Eg, I have a Site Context and I want to use the SiteId from that Entity.

May relate to #134

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants