eZPublishCommunityProject  2013.5
eZ\Publish\Core\MVC\Symfony\Event\APIContentExceptionEvent Class Reference

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

+ Inheritance diagram for eZ\Publish\Core\MVC\Symfony\Event\APIContentExceptionEvent:
+ Collaboration diagram for eZ\Publish\Core\MVC\Symfony\Event\APIContentExceptionEvent:

Public Member Functions

 __construct (Exception $apiException, array $contentMeta)
 
 getApiException ()
 
 getContentMeta ()
 Returns an array of metadata concerning the content that failed to load through API. More...
 
 getContentView ()
 
 hasContentView ()
 
 setContentView (ContentViewInterface $contentView)
 Injects the ContentView object to display content from. More...
 

Private Attributes

 $apiException
 
 $contentMeta
 
 $contentView
 

Detailed Description

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.

Constructor & Destructor Documentation

eZ\Publish\Core\MVC\Symfony\Event\APIContentExceptionEvent::__construct ( Exception  $apiException,
array  $contentMeta 
)

Member Function Documentation

eZ\Publish\Core\MVC\Symfony\Event\APIContentExceptionEvent::getApiException ( )
eZ\Publish\Core\MVC\Symfony\Event\APIContentExceptionEvent::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/...
Returns
array

Referenced by eZ\Publish\Core\MVC\Legacy\EventListener\APIContentExceptionListener\onAPIContentException().

eZ\Publish\Core\MVC\Symfony\Event\APIContentExceptionEvent::getContentView ( )
Returns
eZ\Publish\Core\MVC\Symfony\Event\APIContentExceptionEvent::hasContentView ( )
Returns
boolean
eZ\Publish\Core\MVC\Symfony\Event\APIContentExceptionEvent::setContentView ( ContentViewInterface  $contentView)

Injects the ContentView object to display content from.

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

Parameters
\eZ\Publish\Core\MVC\Symfony\View\ContentViewInterface$contentView

Referenced by eZ\Publish\Core\MVC\Legacy\EventListener\APIContentExceptionListener\onAPIContentException().

Member Data Documentation

eZ\Publish\Core\MVC\Symfony\Event\APIContentExceptionEvent::$apiException
private
eZ\Publish\Core\MVC\Symfony\Event\APIContentExceptionEvent::$contentMeta
private
eZ\Publish\Core\MVC\Symfony\Event\APIContentExceptionEvent::$contentView
private

The documentation for this class was generated from the following file: