Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP

Loading…

Problem with admin generator additiona action and sfPropelORMRouteCollection (with corrected pull) #161

Merged
merged 4 commits into from

2 participants

@ldath

For example I have this kind of generator.yml file:

generator:
  class: sfPropelGenerator
  param:

...

    with_propel_route:     1

    config:
      list:
      ...
        actions:
          _new: ~
          return: { label: Return }

I have created rout for it with set to true with_wildcard_routes:

'with_wildcard_routes' => true

But with_wildcard_routes not only means [prefix_path]>/batch/action but can be any action [prefix_path]/:action/action - where action can be anything in my example there is a link (GET method):

<a href="[prefix_path]/ListReturn/action">Return</a>. 

If sf_method is set to POST really, really lots of the WTF IS THIS SHIT can be.

ldath added some commits
@ldath ldath repo in repo ignore 314d218
@ldath ldath with_wildcard_routes not only means <prefix_path>/batch/action but <p…
…refix_path>/:action/action where action can be anything and in Symfony in most of cases when admin generator is used thare is a link (GET method) like for example <a href="<prefix_path>/ListReturn/action">Return</a>. If sf_method is set to POST realy realy lots of the WTF IS THIS SHIT can be.
8690dbd
@ldath ldath solving problem with batch action because only get, head sf_method ar…
…e by default set
055a837
@ldath ldath Merge remote-tracking branches 'propel/master' and 'origin/master' 065f51e
@willdurand willdurand merged commit 686237b into propelorm:master

1 check passed

Details default The Travis build passed
@willdurand
Owner

Thank you.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Commits on Sep 21, 2012
  1. @ldath

    repo in repo ignore

    ldath authored
  2. @ldath

    with_wildcard_routes not only means <prefix_path>/batch/action but <p…

    ldath authored
    …refix_path>/:action/action where action can be anything and in Symfony in most of cases when admin generator is used thare is a link (GET method) like for example <a href="<prefix_path>/ListReturn/action">Return</a>. If sf_method is set to POST realy realy lots of the WTF IS THIS SHIT can be.
  3. @ldath
Commits on Oct 3, 2012
  1. @ldath
This page is out of date. Refresh to see the latest.
Showing with 2 additions and 1 deletion.
  1. +1 −0  .gitignore
  2. +1 −1  lib/routing/sfPropelORMRouteCollection.class.php
View
1  .gitignore
@@ -5,3 +5,4 @@ test/functional/fixtures/lib/model/map/
test/functional/fixtures/lib/model/om/
mockproject/
junit.xml
+.svn
View
2  lib/routing/sfPropelORMRouteCollection.class.php
@@ -103,7 +103,7 @@ protected function getWildcardRouteForCollection()
return new $this->routeClass(
sprintf('%s/:action/action.:sf_format', $this->options['prefix_path']),
array_merge(array('module' => $this->options['module'], 'sf_format' => 'html'), $this->options['default_params']),
- array_merge($this->options['requirements'], array('sf_method' => 'post')),
+ array_merge($this->options['requirements'], array('sf_method' => array('get', 'head', 'post'))),
array('model' => $this->options['model'], 'type' => 'list', 'query_methods' => $this->options['query_methods']['list'])
);
}
Something went wrong with that request. Please try again.