eZ\Publish\Core\MVC\Symfony\FieldType\Page\PageServiceFactory::buildService PHP Method

buildService() public method

Builds the page service.
public buildService ( string $serviceClass, eZ\Publish\Core\MVC\ConfigResolverInterface $resolver, Gateway $storageGateway, eZ\Publish\API\Repository\ContentService $contentService ) : PageService
$serviceClass string the class of the page service
$resolver eZ\Publish\Core\MVC\ConfigResolverInterface
$storageGateway eZ\Publish\Core\FieldType\Page\PageStorage\Gateway
$contentService eZ\Publish\API\Repository\ContentService
return eZ\Publish\Core\FieldType\Page\PageService
    public function buildService($serviceClass, ConfigResolverInterface $resolver, PageGateway $storageGateway, ContentService $contentService)
    {
        $pageSettings = $resolver->getParameter('ezpage');
        /** @var $pageService \eZ\Publish\Core\FieldType\Page\PageService */
        $pageService = new $serviceClass($contentService, $pageSettings['layouts'], $pageSettings['blocks']);
        $pageService->setStorageGateway($storageGateway);
        return $pageService;
    }
PageServiceFactory