This site has been archived. To learn more about our current products Ibexa Content, Ibexa Experience, Ibexa Commerce head over to the Ibexa Developer Portal

eZ Community » Forums » eZ Publish 5 Platform » How do I get the searchService form...
expandshrink

How do I get the searchService form within another service ?

How do I get the searchService form within another service ?

Monday 09 September 2013 3:41:49 pm - 3 replies

Hi,

I am trying to implement a service that returns some contents by performing searches. How do I get the searchService ?

$rep = $this->getRepository();
$searchService = $rep->getSearchService();

to get the searchService, what should I do within my service to achieve the same ?

BTW: the documentation in https://confluence.ez.no/display/EZP51/2.+Browsing%2C+finding%2C+viewing#id-2.Browsing,finding,viewing-Search is full of broken links to apidoc.ez.no

 

Thanks

Monday 09 September 2013 3:49:42 pm

Hi Francesco,

Just pass as arguments of your service @ezpublish.api.repository 

You will have access to all repository (SearchService, UserSErvice and so one happy.gif Emoticon )

Cheers

Philippe

Monday 09 September 2013 5:05:32 pm

Thaks, that works!

Tuesday 10 September 2013 6:17:50 pm

Hi Francesco

Please note that you can directly inject your needed services. Check papi.yml in EzPublishCoreBundle.

expandshrink

You must be logged in to post messages in this topic!

36 542 Users on board!

Forums menu

Proudly Developed with from