Skip to content

Commit

Permalink
Merge pull request #17 from TomHAnderson/hotfix/null-route-parameter
Browse files Browse the repository at this point in the history
Clear route parameter based on config
  • Loading branch information
TomHAnderson committed Dec 18, 2018
2 parents 747140b + 1a5389c commit c41d022
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions src/Strategy/CollectionLink.php
Original file line number Diff line number Diff line change
Expand Up @@ -58,11 +58,9 @@ public function extract($value)
->attachByName('WordCamelCaseToUnderscore')
->attachByName('StringToLower');

// Better way to create mapping name?
// use zf-hal collection_name
$link = new Link('self');
$link->setRoute($config['route_name']);
$link->setRouteParams(['id' => null]);
$link->setRouteParams([$config['route_identifier_name'] => null]);

$filterValue = [
'field' => $value->getMapping()['mappedBy'] ? : $value->getMapping()['inversedBy'],
Expand Down

0 comments on commit c41d022

Please sign in to comment.