Message-ID: <2136134627.3534.1485853522486.JavaMail.confluence@ip-10-127-227-164> Subject: Exported From Confluence MIME-Version: 1.0 Content-Type: multipart/related; boundary="----=_Part_3533_1059290081.1485853522486" ------=_Part_3533_1059290081.1485853522486 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Content-Location: file:///C:/exported.html
>= ;=3D 2015.01
In lots of cases, request will provide a contentId or a locationId. Befo= re using them, you will have to load API object within your controller.
For example:
public function listBlogPostsAction( $locationId ) { =09$location =3D $repository->getLocationService()->loadLocation( $lo= cationId );=20
Thanks to the param converter, you can directly have the API objec= t at your disposal. All you have to do is:
Example using Locations:
use eZ\Publish\API\Repository\Values\Content\Location; public function listBlogPostsAction( Location $location ) { =09// use my $location object=20
If you want to understand how it works you can check Symfony's param convert= er documentation and the pull request= implementing the Repository ParamConverters.
See example pull request on the DemoBun= dle it provides a few concrete examples.