Global navigation

   Documentation Center
   eZ Studio & eZ Platform
     User Manual
     Technical Manual
   eZ Publish 4.x / legacy

eZ Publish (5.x)

eZ Publish 5.x | For eZ Platform & eZ Studio topics see Technical manual and User manual, for eZ Publish 4.x and Legacy topics see eZ Publish legacy

Skip to end of metadata
Go to start of metadata

>= 2015.01

What it does

In lots of cases, request will provide a contentId or a locationId. Before using them, you will have to load API object within your controller.

For example:

Thanks to the param converter, you can directly  have the API object at your disposal. All you have to do is:

  • For Locations:
    • In your controllers signature, type int the variable to Location.
    • Make sure a parameter named "locationId" is provided by the request.
  • For Content items:
    • In your controller's signature, typeint the variable to Content
    • Make sure a parameter named "contentId" is provided by the request

Example using Locations:

How it works

If you want to understand how it works you can check Symfony's param converter documentation and the pull request implementing the Repository ParamConverters.

How to migrate your current application

See example pull request on the DemoBundle it provides a few concrete examples.

  • No labels