Class

eZ\Publish\Core\MVC\Symfony\Event\APIContentExceptionEvent

class APIContentExceptionEvent extends Event

This event is dispatched when an Exception from eZ Publish API is thrown and could not be caught before.

It allows you to handle this exception and affect a specific Response for it.

Methods

__construct(Exception $apiException, array $contentMeta)

Exception getApiException()

setContentView(View $contentView)

Injects the ContentView object to display content from.

View getContentView()

bool hasContentView()

array getContentMeta()

Returns an array of metadata concerning the content that failed to load through API.

Details

at line 36
public __construct(Exception $apiException, array $contentMeta)

Parameters

Exception $apiException
array $contentMeta

at line 45
public Exception getApiException()

Return Value

Exception

at line 56
public setContentView(View $contentView)

Injects the ContentView object to display content from.

It is a good idea to call {@link stopPropagation()} after that so that other listeners won't override it.

Parameters

View $contentView

at line 64
public View getContentView()

Return Value

View

at line 72
public bool hasContentView()

Return Value

bool

at line 86
public array getContentMeta()

Returns an array of metadata concerning the content that failed to load through API.

This array includes: - contentId Content Id when applicable (not available if a location was looked up) - locationId Location Id when applicable (not available if a content was looked up) - viewType full/line/...

Return Value

array