Class

eZ\Publish\Core\REST\Server\Service\ExpressionRouterRootResourceBuilder

class ExpressionRouterRootResourceBuilder implements RootResourceBuilderInterface

Class ExpressionRouterRootResourceBuilder.

This class builds a Root from an array building the href's using ExpressionLanguage to build href's from the router or templateRouter.

Example $resourceConfig structure:

array( 'content' => array( 'mediaType' => '', 'href' => 'router.generate("ezpublishrestlistContentTypes")', ), 'usersByRoleId' => array( 'mediaType' => 'UserRefList', 'href' => 'templateRouter.generate("ezpublishrestloadUsers", {roleId: "{roleId}"})', ), )

Methods

__construct(RouterInterface $router, RouterInterface $templateRouter, array $resourceConfig)

Creates a new resource builder.

array|Root buildRootResource()

Build root resource.

Details

at line 59
public __construct(RouterInterface $router, RouterInterface $templateRouter, array $resourceConfig)

Creates a new resource builder.

Parameters

RouterInterface $router
RouterInterface $templateRouter
array $resourceConfig

at line 71
public array|Root buildRootResource()

Build root resource.

Return Value

array|Root