Bug #38476

RoutePart doesn't work with 'complex' uriPattern objects

Added by Pascal Walter over 9 years ago. Updated over 8 years ago.

Status:
Closed
Priority:
Should have
Category:
MVC - Routing
Target version:
-
Start date:
2012-06-29
Due date:
% Done:

0%

Estimated time:
PHP Version:
Has patch:
No
Complexity:

Description

I tried to use the RoutePart for a 'complex' object.

Routes.yaml:

-
  name: 'Single Plausibility Version Actions'
  uriPattern:    'versionplausibility/{@action}/{version}'
  defaults:
    '@package':    'ITC.Collab'
    '@controller': 'VersionPlausibility'
    '@action':     'show'
  routeParts:
    version:
      objectType: 'ITC\Collab\Domain\Model\VersionPlausibility'
      uriPattern: '{version.fork.item.name}/{version.fork.creatorDomain.name}/{version.number}'

Resulting URL:
"http://localhost/versionplausibility/show///-1"

I removed the uriPattern and added a @FLOW3\Identity to a date property of the version class. That did work and routed well! (http://localhost/versionplausibility/show/2012-06-03) So i guess the uriPattern objects aren't correctly resolved

All references to other classes are set and work very well.

Also available in: Atom PDF