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

Core/Base/Exceptions/ForbiddenException.php
Go to the documentation of this file.
1 <?php
2
7 namespace eZ\Publish\Core\Base\Exceptions;
8
9 use eZ\Publish\API\Repository\Exceptions\ForbiddenException as APIForbiddenException;
10 use eZ\Publish\Core\Base\Translatable;
11 use eZ\Publish\Core\Base\TranslatableBase;
12
16 class ForbiddenException extends APIForbiddenException implements Translatable
17 {
18 use TranslatableBase;
19
26 public function __construct($messageTemplate, array $parameters = [])
27 {
29 $this->setMessageTemplate($messageTemplate);
30 $this->setParameters($parameters);
31
32 parent::__construct($this->getBaseTranslation());
33 }
34 }
eZ\Publish\Core\Base\TranslatableBase
trait TranslatableBase
Trait providing a default implementation of Translatable.
Definition: TranslatableBase.php:13
eZ\Publish\Core\Base\$parameters
$parameters
Definition: TranslatableBase.php:16
eZ\Publish\API\Repository\Exceptions\ForbiddenException
An Exception which is thrown if an operation cannot be performed by a service although the current us...
Definition: API/Repository/Exceptions/ForbiddenException.php:16
eZ\Publish\Core\Base\Exceptions\ForbiddenException
Forbidden Exception implementation.
Definition: Core/Base/Exceptions/ForbiddenException.php:17
eZ\Publish\Core\Base\Exceptions\ForbiddenException\__construct
__construct($messageTemplate, array $parameters=[])
Definition: Core/Base/Exceptions/ForbiddenException.php:26
eZ\Publish\Core\Base\Translatable
Interface for translatable value objects.
Definition: Core/Base/Translatable.php:13
eZ\Publish\Core\Base\Translatable\setMessageTemplate
setMessageTemplate($messageTemplate)
Injects the message template.
eZ\Publish\Core\Base\Translatable\getBaseTranslation
getBaseTranslation()
Returns base translation, computed with message template and parameters.
eZ\Publish\Core\Base\Translatable\setParameters
setParameters(array $parameters)
Injects the hash map, with param placeholder as key and its corresponding value.
eZ\Publish\Core\Base\Exceptions
Definition: Core/Base/Exceptions/BadStateException.php:7
Copyright © 1998 – 2026 7x. All rights reserved. Licensed under the GNU GPLv2+.