Message-ID: <1166376767.3210.1485852400587.JavaMail.confluence@ip-10-127-227-164> Subject: Exported From Confluence MIME-Version: 1.0 Content-Type: multipart/related; boundary="----=_Part_3209_1361010580.1485852400587" ------=_Part_3209_1361010580.1485852400587 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Content-Location: file:///C:/exported.html
In lots of cases, a request will provide a contentId or a locationId. Be= fore using them, you will have to load API object within your controller.= p>
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 object at y= our 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 conver= ter documentation and the pull reques= t implementing the Repository ParamConverters.
See example pull request on the DemoBun= dle it provides a few concrete examples.