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

LimitationNotFoundException.php
Go to the documentation of this file.
1 <?php
2
7 namespace eZ\Publish\Core\Base\Exceptions\NotFound;
8
9 use eZ\Publish\Core\Base\Exceptions\Httpable;
10 use Exception;
11 use eZ\Publish\Core\Base\TranslatableBase;
12 use eZ\Publish\Core\Base\Translatable;
13 use RuntimeException;
14
18 class LimitationNotFoundException extends RuntimeException implements Httpable, Translatable
19 {
20 use TranslatableBase;
21
28 public function __construct($limitation, Exception $previous = null)
29 {
30 $this->setMessageTemplate(
31 "Limitation '%limitation%' not found, needs to be implemented or configured to use Limitation\\BlockingLimitationType (%ezpublish.api.role.limitation_type.blocking.class%"
32 );
33 $this->setParameters(['%limitation%' => $limitation]);
34
35 parent::__construct($this->getBaseTranslation(), self::INTERNAL_ERROR, $previous);
36 }
37 }
eZ\Publish\Core\Base\TranslatableBase
trait TranslatableBase
Trait providing a default implementation of Translatable.
Definition: TranslatableBase.php:13
eZ\Publish\Core\Base\Exceptions\NotFound\LimitationNotFoundException
Limitation Not Found Exception implementation.
Definition: LimitationNotFoundException.php:19
eZ\Publish\Core\Base\Exceptions\NotFound\LimitationNotFoundException\__construct
__construct($limitation, Exception $previous=null)
Creates a Limitation Not Found exception with info on how to fix.
Definition: LimitationNotFoundException.php:28
eZ\Publish\Core\Base\Exceptions\Httpable
Interface for exceptions that maps to http status codes.
Definition: Httpable.php:15
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\NotFound
Definition: FieldTypeNotFoundException.php:7
Copyright © 1998 – 2026 7x. All rights reserved. Licensed under the GNU GPLv2+.