Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Loading…

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

Merged
merged 4 commits into from

2 participants

Arkadiusz Tułodziecki William Durand
Arkadiusz Tułodziecki

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
Arkadiusz Tułodziecki ldath repo in repo ignore 314d218
Arkadiusz Tułodziecki 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
Arkadiusz Tułodziecki ldath solving problem with batch action because only get, head sf_method ar…
…e by default set
055a837
Arkadiusz Tułodziecki ldath Merge remote-tracking branches 'propel/master' and 'origin/master' 065f51e
William Durand willdurand merged commit 686237b into from
William Durand
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. Arkadiusz Tułodziecki

    repo in repo ignore

    ldath authored
  2. Arkadiusz Tułodziecki

    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. Arkadiusz Tułodziecki
Commits on Oct 3, 2012
  1. Arkadiusz Tułodziecki
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
1  .gitignore
View
@@ -5,3 +5,4 @@ test/functional/fixtures/lib/model/map/
test/functional/fixtures/lib/model/om/
mockproject/
junit.xml
+.svn
2  lib/routing/sfPropelORMRouteCollection.class.php
View
@@ -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.