Skip to content
This repository has been archived by the owner on Jan 29, 2020. It is now read-only.

InjectTemplateListener - returnn api proper view #163

Merged
merged 3 commits into from
Jun 30, 2016

Conversation

karborator
Copy link

@karborator karborator commented Jun 19, 2016

  • InjectTemplateListener - injectTemplate : set $preferRouteMatchController view config param if exists. This way apigility rest service can return proper view per api .

  • prefer_route_match_controller should be set at the config route to true :

    'route' => '/sales[/:sales_id]',
                    'defaults' => array(
                        'controller' => 'Ecommerce\\V1\\Rest\\Sales\\Controller',
                        'prefer_route_match_controller'=>true
                    ),
  • controller_map should be set at the config view_manager also:

      'controller_map' => array(
            'Ecommerce\\V1\\Rest\\Sales\\Controller' => 'ecommerce/sales'
      ),
  • AcceptableViewModelSelector - notice fix

nikolay added 3 commits June 19, 2016 13:31
InjectTemplateListener  - injectTemplate : set $preferRouteMatchController view config param if exists. This way apigility rest service can return proper view per api .

prefer_route_match_controller should be set at the config route to true  :
controller_map should be set at the config view_manager also .
InjectTemplateListener  to work with preferController routeMatch flag and controller_map
, so it can return proper template when using Apigility rest service
@weierophinney weierophinney added this to the 3.0.2 milestone Jun 30, 2016
@weierophinney weierophinney self-assigned this Jun 30, 2016
@weierophinney weierophinney merged commit 3ff4408 into zendframework:master Jun 30, 2016
weierophinney added a commit that referenced this pull request Jun 30, 2016
InjectTemplateListener - returnn api proper view
weierophinney added a commit that referenced this pull request Jun 30, 2016
weierophinney added a commit that referenced this pull request Jun 30, 2016
weierophinney added a commit that referenced this pull request Jun 30, 2016
@weierophinney
Copy link
Member

Thanks, @karborator !

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants