Exponential 5.x Kernel 7.5.40 Exponential New Stack (Symfony-based) Kernel — PHP Class Reference

Public Member Functions | Private Attributes | List of all members
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:

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

## Private Attributes
| $apiException
| $contentView
| $contentMeta

## 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.

Definition at line 17 of file APIContentExceptionEvent.php.

## Constructor & Destructor Documentation

## ◆ __construct()

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

Definition at line 28 of file APIContentExceptionEvent.php.

References eZ\Publish\Core\MVC\Symfony\Event\APIContentExceptionEvent\$apiException, and eZ\Publish\Core\MVC\Symfony\Event\APIContentExceptionEvent\$contentMeta.

## Member Function Documentation

## ◆ getApiException()

eZ\Publish\Core\MVC\Symfony\Event\APIContentExceptionEvent::getApiException | ( |  | ) |

Returns
  \Exception

Definition at line 37 of file APIContentExceptionEvent.php.

References eZ\Publish\Core\MVC\Symfony\Event\APIContentExceptionEvent\$apiException.

## ◆ getContentMeta()

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

Definition at line 78 of file APIContentExceptionEvent.php.

References eZ\Publish\Core\MVC\Symfony\Event\APIContentExceptionEvent\$contentMeta.

## ◆ getContentView()

eZ\Publish\Core\MVC\Symfony\Event\APIContentExceptionEvent::getContentView | ( |  | ) |

Returns
  \eZ\Publish\Core\MVC\Symfony\View\View

Definition at line 56 of file APIContentExceptionEvent.php.

References eZ\Publish\Core\MVC\Symfony\Event\APIContentExceptionEvent\$contentView.

## ◆ hasContentView()

eZ\Publish\Core\MVC\Symfony\Event\APIContentExceptionEvent::hasContentView | ( |  | ) |

Returns
  bool

Definition at line 64 of file APIContentExceptionEvent.php.

## ◆ setContentView()

eZ\Publish\Core\MVC\Symfony\Event\APIContentExceptionEvent::setContentView | ( | View | $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\View | $contentView |

Definition at line 48 of file APIContentExceptionEvent.php.

References eZ\Publish\Core\MVC\Symfony\Event\APIContentExceptionEvent\$contentView.

## Member Data Documentation

## ◆ $apiException

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

Definition at line 20 of file APIContentExceptionEvent.php.

Referenced by eZ\Publish\Core\MVC\Symfony\Event\APIContentExceptionEvent\__construct(), and eZ\Publish\Core\MVC\Symfony\Event\APIContentExceptionEvent\getApiException().

## ◆ $contentMeta

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

Definition at line 26 of file APIContentExceptionEvent.php.

Referenced by eZ\Publish\Core\MVC\Symfony\Event\APIContentExceptionEvent\__construct(), and eZ\Publish\Core\MVC\Symfony\Event\APIContentExceptionEvent\getContentMeta().

## ◆ $contentView

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

Definition at line 23 of file APIContentExceptionEvent.php.

Referenced by eZ\Publish\Core\MVC\Symfony\Event\APIContentExceptionEvent\getContentView(), and eZ\Publish\Core\MVC\Symfony\Event\APIContentExceptionEvent\setContentView().

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

- APIContentExceptionEvent.php

Copyright © 1998 – 2026 7x. All rights reserved. Licensed under the GNU GPLv2+.