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

Core/Base/Exceptions/ContentTypeFieldDefinitionValidationException.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\ContentTypeFieldDefinitionValidationException as APIContentTypeFieldDefinitionValidationException;
10 use eZ\Publish\Core\Base\Translatable;
11 use eZ\Publish\Core\Base\TranslatableBase;
12
16 class ContentTypeFieldDefinitionValidationException extends APIContentTypeFieldDefinitionValidationException implements Translatable
17 {
18 use TranslatableBase;
19
31 protected $errors;
32
40 public function __construct(array $errors)
41 {
42 $this->errors = $errors;
43 $this->setMessageTemplate('ContentType FieldDefinitions did not validate');
44 parent::__construct($this->getBaseTranslation());
45 }
46
52 public function getFieldErrors()
53 {
54 return $this->errors;
55 }
56 }
eZ\Publish\Core\Base\TranslatableBase
trait TranslatableBase
Trait providing a default implementation of Translatable.
Definition: TranslatableBase.php:13
eZ\Publish\API\Repository\Exceptions\ContentTypeFieldDefinitionValidationException
This Exception is thrown on create or update content type one or more given field definitions are not...
Definition: API/Repository/Exceptions/ContentTypeFieldDefinitionValidationException.php:13
eZ\Publish\Core\Base\Exceptions\ContentTypeFieldDefinitionValidationException
This Exception is thrown on create or update content one or more given fields are not valid.
Definition: Core/Base/Exceptions/ContentTypeFieldDefinitionValidationException.php:17
eZ\Publish\Core\Base\Exceptions\ContentTypeFieldDefinitionValidationException\getFieldErrors
getFieldErrors()
Returns an array of field validation error messages.
Definition: Core/Base/Exceptions/ContentTypeFieldDefinitionValidationException.php:52
eZ\Publish\Core\Base\Exceptions\ContentTypeFieldDefinitionValidationException\$errors
$errors
Definition: Core/Base/Exceptions/ContentTypeFieldDefinitionValidationException.php:31
eZ\Publish\Core\Base\Exceptions\ContentTypeFieldDefinitionValidationException\__construct
__construct(array $errors)
Generates: Content fields did not validate.
Definition: Core/Base/Exceptions/ContentTypeFieldDefinitionValidationException.php:40
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\Exceptions
Definition: Core/Base/Exceptions/BadStateException.php:7
Copyright © 1998 – 2026 7x. All rights reserved. Licensed under the GNU GPLv2+.